home *** CD-ROM | disk | FTP | other *** search
/ PSION CD 2 / PsionCDVol2.iso / Programs / 376 / README.TXT < prev    next >
Encoding:
Text File  |  1999-07-12  |  4.3 KB  |  163 lines

  1. APPINFO.OPX Version 1.20
  2. Copyright 1998-1999 Twiddlebit Software
  3. All rights reserved
  4.  
  5. CONTACT
  6. -------
  7.  
  8. Note that this OPX is provided on an "as is" basis with no guarantee
  9. of support.
  10.  
  11. For the latest version see the following www page:
  12.  
  13.     http://www.twiddlebit.com
  14.  
  15. NOTE: the WINS version (appinfo_wins.opx) is for use with the ER5 emulator
  16. or the release variant of the ER3 emulator. It will not work on the debug
  17. variant of the ER3 emulator.
  18.  
  19. INTRODUCTION
  20. ------------
  21.  
  22. AppInfo.OPX provides information about applications installed on an
  23. EPOC32 machine. This information includes:
  24.  
  25.     - filenames for the .app file
  26.     - caption names in the current language
  27.     - application capabilities (hidden, embedability, support for new file)
  28.     - icons
  29.  
  30. The OPX will scan all drives starting at y: down to a: and then z: for
  31. apps. For performance reasons the data it gathers will be cached in memory.
  32. There is a function which allows this cached data to be refreshed as needed.
  33.  
  34. EXTRACTING ICONS FROM AN AIF FILE
  35. ---------------------------------
  36.  
  37. Given an AIF file use the following function to extract an icon from
  38. the file:
  39.  
  40.     AppExtractAifIcon:(aifFile$, iconSize&, iconType&, iconFile$)
  41.  
  42.     aifFile$  = full filename for aif file
  43.     iconSize& = 16, 24, 32, 48,...
  44.     iconType& = 0 for the normal icon, 1 for the mask icon
  45.     iconFile$ = full filename for icon mbm file to be created
  46.  
  47. NOTE: see also the function AppExtractIcon:() which uses cached data.
  48.  
  49. SCANNING FOR APPS
  50. -----------------
  51.  
  52. The first thing that you need to do is to tell the OPX to scan for all
  53. the apps. This is done using:
  54.  
  55.     AppUpdate:
  56.  
  57. This only needs to be done once, the info will then be cached.
  58. To rescan the disks for new/deleted apps use the AppUpdate: function again.
  59. This will return 1 if any changes were detected.
  60.  
  61. To scan the list of cached apps use the following type of code:
  62.  
  63.     AppStartScan:
  64.     WHILE AppNext:
  65.  
  66.         REM add your code here
  67.  
  68.     ENDWH
  69.  
  70. When using AppNext: the OPX maintains a pointer to the current app info.
  71. Information about this app can be obtained using the following functions:
  72.  
  73.     AppFileName$:
  74.  
  75.         The full filename for the app
  76.  
  77.     AppName$:
  78.  
  79.         The name of the app file (without path or extension)
  80.  
  81.     AppUID&:
  82.  
  83.         The UID for the app
  84.  
  85.     AppCaption$:
  86.  
  87.         The name of the app in the current language
  88.  
  89.     AppCapability:(BYREF hidden&, BYREF newFile&, BYREF embed&)
  90.  
  91.         This sets the supplied parameters as follows:
  92.  
  93.         hidden&        = 1 if the app is marked as hidden
  94.         newFile&    = 1 if the app supports the system->new file command
  95.         embed&        = 0 if the app does not support embedding
  96.                     = 1 if the app supports embedding
  97.                     = 2 if the app supports embedding only
  98.  
  99. You can also obtain one of the 3 icons for the app using this
  100. function:
  101.  
  102.     AppExtractIcon:(iconIndex&, iconType&, iconFile$)
  103.  
  104.         iconIndex$    = 0, 1 or 2 (0 for the smallest icon)
  105.         iconType& = 0 for the normal icon, 1 for the mask icon
  106.         iconFile$ = full filename for icon mbm file to be created
  107.  
  108. SIMULATING EVENTS
  109. -----------------
  110.  
  111. AppInfo.OPX also allows the simulation of any type of event,
  112. including keypress and pointer events using:
  113.  
  114.     AppSimulateEvent&:(type&,param1&,param2&)
  115.  
  116. Constants for the value of type& are defined in the appinfo.oxh file
  117. as follows. The type governs the meaning of param1 and param2 as
  118. follows:
  119.  
  120. TYPE                PARAM1        PARAM2
  121. KAppEvNone&            -        -
  122. KAppEvPointerSwitchOn&        -        -
  123. KAppEvRedraw&            -        -
  124. KAppEvSwitchOn&            -        -
  125. KAppEvActive&            -        -
  126. KAppEvInactive&            -        -
  127. KAppEvUpdateModifiers&        -        -
  128. KAppEvSwitchOff&        -        -
  129.  
  130. KAppEvKeyDown&            key scan code    -
  131. KAppEvKeyUp&            key scan code    -
  132.  
  133. KAppEvPointerMove&        x coord        y coord
  134. KAppEvButton1Down&        x coord        y coord
  135. KAppEvButton1Up&        x coord        y coord
  136. KAppEvButton2Down&        x coord        y coord
  137. KAppEvButton2Up&        x coord        y coord
  138. KAppEvButton3Down&        x coord        y coord
  139. KAppEvButton4Up&        x coord        y coord
  140.  
  141. Note that the event will be sent to whatever app happens to be
  142. in the foreground or has keyboard focus.
  143.  
  144. OPX FUNCTION SUMMARY
  145. --------------------
  146.  
  147.     AppExtractAifIcon:(aifFile$, iconSize&, iconType&, iconFile$)
  148.  
  149.     AppUpdate:
  150.     AppStartScan:
  151.     AppNext:
  152.  
  153.     AppName$:
  154.     AppUID&:
  155.     AppFileName$:
  156.     AppCaption$:
  157.     AppCapability:(BYREF hidden&, BYREF newFile&, BYREF embed&)
  158.  
  159.     AppExtractIcon:(iconIndex&, iconType&, iconFile$)
  160.  
  161.     AppSimulateEvent&:(type&,param1&,param2&)
  162.     
  163.