home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Basic / wst!blz1.dms / in.adf / docs / rilibdocs.lha / RICommoditiesLib.doc < prev    next >
Encoding:
Text File  |  1994-09-05  |  3.9 KB  |  132 lines

  1. Library Name:
  2.   ricommoditieslib #89
  3.  
  4. Authors:
  5.   ReflectiveImages, 17 Mayles Road, Southsea, Portsmouth, Hampshire, UK PO4 8NP
  6.  
  7. OverView:
  8.   Another Reflective Images Library, nice header...
  9.  
  10. Authors Docs:
  11.  
  12. -----------------------------------------------------------------------------
  13. ====          Reflective Images Commodities Library V0.9 (C)1994         ====
  14. -----------------------------------------------------------------------------
  15.  
  16. Introduction
  17. ============
  18.  
  19. This library allows the easy use of Commodities. It requires Kickstart 2 or
  20. higher.
  21.  
  22.  
  23.  
  24. Function : MakeCommodity
  25. -----------------------------------------------------------------------------
  26. Modes  : Amiga
  27. Syntax : success=MakeCommodity(name$,title$,description$)
  28.  
  29. This command attempts to add your Commodity to the list of commodities.
  30. A return value of -1 indicates success, 0 means failure. (not enough memory)
  31.  
  32. name$ refers to the name of the Commodity and it should be unique. This is
  33. the name that appears when running the Commodity Exchange program.
  34. title$ is the title of your program, e.g. "My Screen Blanker".
  35. description$ is a brief description of your program.
  36.  
  37. The Commodity Exchange program will then have 'name$' in its list of
  38. Commodities and when a user clicks on your commodity, it will display
  39. the title$ and description$. 
  40.  
  41.  
  42. Function : SetHotKey
  43. ----------------------------------------------------------------------------
  44. Modes  : Amiga
  45. Syntax : success=SetHotKey(hotkey#,hotkeydescription$)
  46.  
  47. This will add a hotkey event to your commodity so that after a hotkey
  48. has been pressed you can find out which one.
  49.  
  50. e.g.    success=SetHotKey(0,"lalt lshift a")
  51.  
  52.  
  53. Function : HotKeyHit
  54. ----------------------------------------------------------------------------
  55. Modes  : Amiga
  56. Syntax : hitkeynum=HotKeyHit
  57.  
  58. This will return the number of the hot key which has been hit since the
  59. last 'CommodityEvent' was called, or -1 if no such hotkey has been activated.
  60.  
  61.  
  62. Function : CommodityEvent
  63. ----------------------------------------------------------------------------
  64. Modes  : Amiga
  65. Syntax : anyevent=CommodityEvent
  66.  
  67. This looks to see if either
  68.   a) A hotkey has been pressed
  69.   b) A message from Exchange has been received
  70.  
  71. and returns -1 if such an event occurred, of 0 is nothing has yet happened.
  72. This should be inside a Repeat-Until loop, e.g.
  73.  
  74.   Repeat
  75.     VWait
  76.     ev.l=Event
  77.     ce.l=CommodityEvent
  78.     hk.l=HotKeyHit    ; This must be used after CommodityEvent
  79.   Until ev or ce or hk
  80.  
  81.  
  82. Statement : SetStatus
  83. ---------------------------------------------------------------------------
  84. Modes  : Amiga
  85. Syntax : SetStatus on|off
  86.  
  87. This sets the status of your Commodity to either Active (on) or Inactive
  88. (off) - this can be seen by running the Commodities Exchange program.
  89.  
  90.  
  91. Function : ExchangeMessage
  92. ---------------------------------------------------------------------------
  93. Modes  : Amiga
  94. Syntax : messnum.l=ExchangeMessage
  95.  
  96. This looks to see if the Commodities Exchange has issued you with as message,
  97. e.g. Hide Interface, Show Interface. It returns the message ID of the incoming
  98. message or 0 for no message.
  99.  
  100.  
  101. Functions: CxAppear/CxDisAppear/CxEnable/CxDisable/CxKill/CxChangeList/CxUnique
  102. -------------------------------------------------------------------------------
  103. Modes : Amiga
  104.  
  105. These are to be used in conjunction with ExchangeMessage, ie
  106.  
  107.   em.l=ExchangeMessage
  108.   Select em
  109.     Case CxAppear
  110.       Gosub _appear
  111.     Case CxDisAppear
  112.             Gosub _disappear
  113.         End Select
  114.  
  115. The functions merely return the ID value associated with that particular
  116. Commodities Exchange message.
  117.  
  118. Functions: ExchangeAppear/ExchangeDisAppear/ExchangeEnable/ExchangeDisable
  119.      ExchangeKill/ExchangeChangeList/ExchangeUnique
  120. Modes : Amiga
  121.  
  122.  
  123. To be used in conjunction with ExchangeMessage, ie
  124.  
  125.   em.l=ExchangeMessage
  126.   If em
  127.     If ExchangeAppear then Gosub _appear
  128.     If ExchangeDisAppear then Gosub _dispappear
  129.   EndIf
  130.  
  131. This is intended as an alternative way of acting upon Exchange Messages.
  132.