home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wpentk.zip / WBPENTK2.DSK / PENBTNDV.IDL < prev    next >
Text File  |  1994-09-28  |  9KB  |  341 lines

  1.  
  2. //# This file was generated by the SOM Compiler.
  3. //# FileName: penbtndv.id2.
  4. //# Generated using:
  5. //#     SOM Precompiler somopc: 2.7
  6. //#     SOM Emitter emitidl: 2.22
  7.  
  8. //  SCC: @(#) 71 4/12/93 12:02:47 1.3 @(#)
  9. //  Module Header
  10. //
  11. //  Module Name: PENBTNDV
  12. //
  13. //  OS/2 Presentation Manager Workplace class definitions
  14. //
  15. //  Copyright (c) International Business Machines Corporation 1992
  16. //
  17.  
  18. #ifndef penbtndv_idl
  19. #define penbtndv_idl
  20.  
  21. #include "wpabs.idl"
  22. #include <somcls.idl>
  23.  
  24. typedef somToken PPENEVENTDATA;
  25. typedef somToken PBUTTON;
  26. //# This number will be used by the ih file.
  27. //# It MUST be kept in sync with whatever is emitted to the .ih file.
  28. //# Otherwise, the .c files & .ih files will be out-of-sync
  29. #define MAXCOMMANDS 15
  30.  
  31. interface M_PenButtonDevice;
  32.  
  33. interface PenButtonDevice : WPAbstract
  34. //# Comment for parent WPAbstract:
  35.  
  36. //---Symbol parentComment is undefined---
  37.  
  38. //
  39. // CLASS: PenButtonDevice
  40. //
  41. // CLASS HIERARCHY:
  42. //    SOMObject
  43. //      └── WPObject
  44. //            └── WPAbstract
  45. //                  └── PenButtonDevice
  46. //
  47. // DESCRIPTION:
  48. //    This is the Pen Button Device support class
  49. //
  50.  
  51. {
  52.   ULONG penAddButtonsMappingsPage(in HWND hwndNotebook);
  53.  
  54.   //
  55.   // METHOD: penAddButtonsMappingsPage                       ( ) PRIVATE
  56.   //                                                         (X) PUBLIC
  57.   // PURPOSE:
  58.   //   Add the Buttons Mapping configuration page to the buttons settings
  59.   //   notebook
  60.   //
  61.  
  62.   ULONG penQueryButtonData(in PPENEVENTDATA pPenEventData);
  63.  
  64.   //
  65.   // METHOD: penQueryButtonData                              ( ) PRIVATE
  66.   //                                                         (X) PUBLIC
  67.   // PURPOSE:
  68.   //   The penQueryButtonData method is called to allow the instance
  69.   //   to query its default button bitmaps to be used on the buttons page.
  70.   //
  71.  
  72.   BOOL penSetButtonData(in PPENEVENTDATA pPenEventData);
  73.  
  74.   //
  75.   // METHOD: penSetButtonData                                ( ) PRIVATE
  76.   //                                                         (X) PUBLIC
  77.   // PURPOSE:
  78.   //   The penSetButtonData method is called to allow the instance
  79.   //   to set its default button bitmaps to be used on the buttons page.
  80.   //
  81.  
  82.  
  83. #ifdef __PRIVATE__
  84.  
  85.   BOOL penSetDriverName(in PSZ pszName);
  86.  
  87.   //
  88.   // METHOD: penSetDriverName                             (X) PRIVATE
  89.   //                                                        ( ) PUBLIC
  90.   // PURPOSE:
  91.   //   Set the Driver Name
  92.   //
  93.  
  94.   BOOL penSetDeviceName(in PSZ pszName);
  95.  
  96.   //
  97.   // METHOD: penSetDeviceName                             (X) PRIVATE
  98.   //                                                        ( ) PUBLIC
  99.   // PURPOSE:
  100.   //   Set the Device Name
  101.   //
  102.  
  103.   BOOL penSetButtonDeviceName(in PSZ pszName);
  104.  
  105.   //
  106.   // METHOD: penSetButtonDeviceName                         (X) PRIVATE
  107.   //                                                        ( ) PUBLIC
  108.   // PURPOSE:
  109.   //   Set the Button Device Name
  110.   //
  111.  
  112.   BOOL penSetBarrelCount(in ULONG ulCount);
  113.  
  114.   //
  115.   // METHOD: penSetBarrelCount                              (X) PRIVATE
  116.   //                                                        ( ) PUBLIC
  117.   // PURPOSE:
  118.   //   Set the number of barrel buttons for the device
  119.   //
  120.  
  121.   PSZ penQueryDriverName();
  122.  
  123.   //
  124.   // METHOD: penQueryDriverName                             (X) PRIVATE
  125.   //                                                        ( ) PUBLIC
  126.   // PURPOSE:
  127.   //   Return the Driver Name
  128.   //
  129.  
  130.   PSZ penQueryDeviceName();
  131.  
  132.   //
  133.   // METHOD: penQueryDeviceName                             (X) PRIVATE
  134.   //                                                        ( ) PUBLIC
  135.   // PURPOSE:
  136.   //   Return the Device Name
  137.   //
  138.  
  139.   PSZ penQueryButtonDeviceName();
  140.  
  141.   //
  142.   // METHOD: penQueryButtonDeviceName                       (X) PRIVATE
  143.   //                                                        ( ) PUBLIC
  144.   // PURPOSE:
  145.   //   Return the ButtonDevice Name
  146.   //
  147.  
  148.   ULONG penQueryBarrelCount();
  149.  
  150.   //
  151.   // METHOD: penQueryBarrelCount                            (X) PRIVATE
  152.   //                                                        ( ) PUBLIC
  153.   // PURPOSE:
  154.   //   Return the number of barrel buttons for the device
  155.   //
  156.  
  157.  
  158. #endif
  159.  
  160.  
  161. #ifdef __SOMIDL__
  162.   implementation {
  163.  
  164.     releaseorder: penAddButtonsMappingsPage,penQueryButtonData,penSetButtonData,
  165.                   penQueryDriverName,penQueryDeviceName,penQueryButtonDeviceName,
  166.                   penQueryBarrelCount,penSetDriverName,penSetDeviceName,
  167.                   penSetButtonDeviceName,penSetBarrelCount;
  168.  
  169.     //# Class Modifiers
  170.     local;
  171.     functionprefix = btn_;
  172.     majorversion = 1;
  173.     minorversion = 1;
  174.     filestem = penbtndv;
  175.     metaclass = M_PenButtonDevice;
  176.     callstyle = oidl;
  177.  
  178.     passthru C_ih_before = ""
  179. "   #define MAXBUTTONNAME        20"
  180. "   #define MAXCOMMANDS          15  /* SHOULD ALWAYS BE AT LEAST WHAT */"
  181. "                                    /* NUMBER OF BUILT-INS IS IN PENPMI.H */"
  182. ""
  183. ""
  184. "   typedef struct _BUTTON"
  185. "   {"
  186. "       USHORT   item;"
  187. "       ULONG    buttonId;"
  188. "       UCHAR    szButtonName[MAXBUTTONNAME];"
  189. "       USHORT   command;"
  190. "       USHORT   oldCommand;"
  191. "   } BUTTON, *PBUTTON;"
  192. ""
  193. #ifdef __PRIVATE__
  194. "   #define BUTTONDEV_VERSION_MAJOR     1"
  195. "   #define BUTTONDEV_VERSION_MINOR     1"
  196. ""
  197. "   #define MSTRLEN                    20"
  198. ""
  199. "   #define DEFAULT_BMP_SIZE           20"
  200. "   #define BITMAP_SPACING              8"
  201. "   #define MAXCOMMANDSIZE             20"
  202. "   #define MAXNUMOFBUTTONS            16"
  203. ""
  204. "   #define BUTTONDLG_HELPRES       40083"
  205. #endif /* __PRIVATE__ */
  206. "";
  207.     //# Public portion
  208.     //
  209.     //   #define MAXBUTTONNAME        20
  210.     //   #define MAXCOMMANDS          15  /* SHOULD ALWAYS BE AT LEAST WHAT */
  211.     //                                    /* NUMBER OF BUILT-INS IS IN PENPMI.H */
  212.     //
  213.     //
  214.     //   typedef struct _BUTTON
  215.     //   {
  216.     //       USHORT   item;
  217.     //       ULONG    buttonId;
  218.     //       UCHAR    szButtonName[MAXBUTTONNAME];
  219.     //       USHORT   command;
  220.     //       USHORT   oldCommand;
  221.     //   } BUTTON, *PBUTTON;
  222.     //
  223.     //# Private portion
  224.     //
  225.     //   #define BUTTONDEV_VERSION_MAJOR     1
  226.     //   #define BUTTONDEV_VERSION_MINOR     1
  227.     //
  228.     //   #define MSTRLEN                    20
  229.     //
  230.     //   #define DEFAULT_BMP_SIZE           20
  231.     //   #define BITMAP_SPACING              8
  232.     //   #define MAXCOMMANDSIZE             20
  233.     //   #define MAXNUMOFBUTTONS            16
  234.     //
  235.     //   #define BUTTONDLG_HELPRES       40083
  236.     //
  237.  
  238.     passthru C_h_before = ""
  239. "   #define MAXBUTTONNAME        20"
  240. ""
  241. "   typedef struct _PENEVENTDATA"
  242. "   {"
  243. "        PVOID   pReserved1;"
  244. "        HMODULE hModule;"
  245. "        ULONG   ulResourceId;"
  246. "        CHAR    pszName[MAXBUTTONNAME];"
  247. "   } PENEVENTDATA, *PPENEVENTDATA;"
  248. "";
  249.  
  250.     //
  251.     //   #define MAXBUTTONNAME        20
  252.     //
  253.     //   typedef struct _PENEVENTDATA
  254.     //   {
  255.     //        PVOID   pReserved1;
  256.     //        HMODULE hModule;
  257.     //        ULONG   ulResourceId;
  258.     //        CHAR    pszName[MAXBUTTONNAME];
  259.     //   } PENEVENTDATA, *PPENEVENTDATA;
  260.     //
  261.  
  262.     //# Internal Instance Variables
  263.     PPENEVENTDATA pInstanceEventData;
  264.     UCHAR DriverName[128];
  265.     UCHAR DeviceName[128];
  266.     UCHAR ButtonDeviceName[128];
  267.     ULONG ulBarrelCount;          // Number of barrel buttons configured
  268.     PBUTTON pButton;              // Button / command structure
  269.     ULONG ulButtonCount;          // Number of buttons configured
  270.     ULONG ulMyCommandCount;       // Number of mappable commands
  271.     ULONG aMyCommandList[MAXCOMMANDS];// Array of mappable commands
  272.  
  273.     //# Method Modifiers
  274.     wpAddSettingsPages: override;
  275.     wpSetup: override;
  276.     wpSaveState: override;
  277.     wpRestoreState: override;
  278.     wpInitData: override;
  279.     wpUnInitData: override;
  280.  
  281.     //# Data Modifiers
  282.     DriverName: internal;
  283.     DeviceName: internal;
  284.     ButtonDeviceName: internal;
  285.     ulBarrelCount: internal;
  286.     pButton: internal;
  287.     ulButtonCount: internal;
  288.     ulMyCommandCount: internal;
  289.     aMyCommandList: internal;
  290.  
  291. #ifdef __PRIVATE__
  292.  
  293.     //# Data Modifiers
  294.  
  295. #endif
  296.  
  297.   };
  298. #endif /* __SOMIDL__ */
  299. };
  300.  
  301. interface M_PenButtonDevice
  302. //# Comment for parent WPAbstract:
  303.  
  304. //---Symbol parentComment is undefined---
  305. {
  306.   ULONG penclsQueryButtonData(in PPENEVENTDATA pPenEventData);
  307.  
  308.   //
  309.   // METHOD: penclsQueryButtonData                           ( ) PRIVATE
  310.   //                                                         (X) PUBLIC
  311.   // PURPOSE:
  312.   //   The penclsQueryButtonData method is called to allow the class object
  313.   //   to specify the default button bitmaps to be used on the buttons page
  314.   //   for its instances.
  315.   //
  316.  
  317.  
  318.  
  319. #ifdef __SOMIDL__
  320.   implementation {
  321.  
  322.     releaseorder: penclsQueryButtonData;
  323.  
  324.     //# Class Modifiers
  325.     local;
  326.     functionprefix = btnM_;
  327.     majorversion = 1;
  328.     minorversion = 1;
  329.     filestem = penbtndv;
  330.     callstyle = oidl;
  331.  
  332.     //# Method Modifiers
  333.     wpclsInitData: override;
  334.     wpclsNew: override;
  335.  
  336.   };
  337. #endif /* __SOMIDL__ */
  338. };
  339.  
  340. #endif  /* penbtndv_idl */
  341.