home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / source / wpshidl / idl / wppalet.idl < prev    next >
Encoding:
Text File  |  1993-11-17  |  6.5 KB  |  235 lines

  1.  
  2. //# This file was generated by the SOM Compiler.
  3. //# FileName: wppalet.id2.
  4. //# Generated using:
  5. //#     SOM Precompiler somopc: 2.2
  6. //#     SOM Emitter emitidl: 2.7
  7.  
  8. //  Module Header
  9. //
  10. //  Module Name: WPPALET
  11. //
  12. //  OS/2 Presentation Manager Workplace class definitions
  13. //
  14. //  Copyright (c) International Business Machines Corporation 1991, 1992
  15. //
  16.  
  17. #ifndef wppalet_idl
  18. #define wppalet_idl
  19.  
  20. #include "wpabs.idl"
  21. #include <somcls.idl>
  22.  
  23. interface M_WPPalette;
  24.  
  25. interface WPPalette : WPAbstract
  26.  
  27. {
  28.   void wpPaintCell(in PCELL pCell,
  29.                    in HPS hps,
  30.                    in PRECTL prcl,
  31.                    in BOOL fHilite);
  32.  
  33.   BOOL wpSetupCell(in PVOID pCellData,
  34.                    in ULONG cb,
  35.                    in ULONG x,
  36.                    in ULONG y);
  37.  
  38.   BOOL wpRedrawCell(in PCELL pCell);
  39.  
  40.   BOOL wpQueryPaletteInfo(in PPALINFO pPalInfo);
  41.  
  42.   BOOL wpSetPaletteInfo(in PPALINFO pPalInfo);
  43.  
  44.   BOOL wpEditCell(in PCELL pCell,
  45.                   in HWND hwndPal);
  46.  
  47.   BOOL wpDragCell(in PCELL pCell,
  48.                   in HWND hwndPal,
  49.                   in PPOINTL ptlDrag);
  50.  
  51.   ULONG wpQueryPaletteHelp();
  52.  
  53.  
  54.  
  55.  
  56. #ifdef __SOMIDL__
  57.   implementation {
  58.  
  59.     releaseorder: wpPaintCell,wpSelectCell,wpSetupCell,wpQueryPaletteInfo,
  60.                   wpSetPaletteInfo,wpEditCell,wpDragCell,withdrawn,
  61.                   wpInitCellStructs,wpRedrawCell,wpPaintPalette,wpMouseAction,
  62.                   wpQueryPaletteHelp,wpShowPalettePointer;
  63.  
  64.     //# Class Modifiers
  65.     externalstem = wppal;
  66.     local;
  67.     externalprefix = pal_;
  68.     majorversion = 1;
  69.     minorversion = 2;
  70.     filestem = wppalet;
  71.     metaclass = M_WPPalette;
  72.     callstyle = oidl;
  73.     dllname = "wpconfig.dll";
  74.  
  75.  
  76.     passthru C_h_after =  ""
  77. "      /*"
  78. "       *  Open view for the wpOpen() method"
  79. "       */"
  80. ""
  81. "      #define OPEN_PALETTE       121"
  82. ""
  83. "      /*"
  84. "       *  Palette save-restore keys"
  85. "       */"
  86. ""
  87. "      #define IDKEY_PALXCELLCOUNT      1000"
  88. "      #define IDKEY_PALYCELLCOUNT      1001"
  89. "      #define IDKEY_PALXCELLWIDTH      1002"
  90. "      #define IDKEY_PALYCELLHEIGHT     1003"
  91. "      #define IDKEY_PALXGAP            1004"
  92. "      #define IDKEY_PALYGAP            1005"
  93. "      #define IDKEY_PALSCREENSIZEX     1006"
  94. "      #define IDKEY_PALSCREENSIZEY     1007"
  95. "      #define IDKEY_PALCELLDATA_FIRST  1050"
  96. ""
  97. "      /*"
  98. "       *  Default palette information"
  99. "       */"
  100. ""
  101. "      #define DEF_XCELLCOUNT      6"
  102. "      #define DEF_YCELLCOUNT      5"
  103. ""
  104. "      /*"
  105. "       *  Variables kept for each open palette window as"
  106. "       *  a structure pointed to by the QWL_USER window"
  107. "       *  word ..."
  108. "       */"
  109. ""
  110. "      typedef struct _CELL"
  111. "      {"
  112. "         ULONG       cbData;           /* Size of the data that follows */"
  113. ""
  114. "         /* Class specific cell data follows immediately afterwards -"
  115. "          * for example the font palette would store the ASCII name of"
  116. "          * the font, and the color palette would store the RGB color"
  117. "          * of the cell."
  118. "          */"
  119. "      } CELL;"
  120. "      typedef CELL *PCELL;"
  121. ""
  122. "      typedef struct _PALINFO"
  123. "      {"
  124. "         ULONG       xCellCount;       /* Number of columns of cells */"
  125. "         ULONG       yCellCount;       /* Number of rows of cells */"
  126. "         ULONG       xCursor;          /* Cursor location (readonly) */"
  127. "         ULONG       yCursor;          /* Cursor location (readonly) */"
  128. "         ULONG       xCellWidth;       /* Width of each cell */"
  129. "         ULONG       yCellHeight;      /* Height of each cell */"
  130. "         ULONG       xGap;             /* X separation of cells */"
  131. "         ULONG       yGap;             /* Y separation of cells */"
  132. "      } PALINFO;"
  133. "      typedef PALINFO *PPALINFO;"
  134. ""
  135. "      #define SetPaletteDataPtr( hwnd, pPaletteData ) \"
  136. "           WinSetWindowULong( hwnd, QWL_USER, (ULONG)pPaletteData )"
  137. ""
  138. "      #define QueryPaletteDataPtr( hwnd ) \"
  139. "           (PPALETTEDATA)WinQueryWindowULong( hwnd, QWL_USER )"
  140. ""
  141. "      typedef struct _PALETTEDATA"
  142. "      {"
  143. "         WPFolder   *Palette;          /* Folder object for this window */"
  144. "         USEITEM     UseItem;          /* Folder object's INUSE list item */"
  145. "         VIEWITEM    ViewItem;"
  146. "         ULONG       xCursor;"
  147. "         ULONG       yCursor;"
  148. "      } PALETTEDATA;"
  149. "      typedef PALETTEDATA *PPALETTEDATA;"
  150. ""
  151. "      typedef struct _CELLSTRUCT"
  152. "      {"
  153. "         RECTL       rclCell;          /* Cell coordinates */"
  154. "         PCELL       pCell;            /* Cell data pointer */"
  155. "      } CELLSTRUCT;"
  156. "      typedef CELLSTRUCT *PCELLSTRUCT;"
  157. "      /*"
  158. "       *  Miscellaneous"
  159. "       */"
  160. ""
  161. "      #define PM_INVALIDATECELL WM_USER+1000"
  162. ""
  163. "      /* Macros that act on a PALINFO..."
  164. "       */"
  165. "      #define PALETTE_WIDTH(p)  ( p.xCellCount*(p.xCellWidth+p.xGap) )"
  166. "      #define PALETTE_HEIGHT(p) ( p.yCellCount*(p.yCellHeight+p.yGap) )"
  167. "      #define ID_PALSCROLLHORZ     8091"
  168. "      #define ID_PALSCROLLVERT     8092"
  169. ""
  170. "      /* Coordinates (these are in DIALOG UNITS)"
  171. "       */"
  172. "      #define CXBUTTON          12       /* Width of a button (with no text) */"
  173. "      #define CYBUTTON          12       /* Height of a button */"
  174. "      #define XBUTTONGAP        6"
  175. "      #define YBUTTONGAP        4"
  176. "      #define CYBUTTONAREA      (CYBUTTON + 2*YBUTTONGAP)"
  177. "      #define DEF_XCELLWIDTH    22"
  178. "      #define DEF_YCELLHEIGHT   16"
  179. "      #define DEF_XCELLGAP      4"
  180. "      #define DEF_YCELLGAP      4"
  181. ""
  182. "";
  183.  
  184.     //# Method Modifiers
  185.     wpInitData: override;
  186.     wpUnInitData: override;
  187.     wpSetup: override;
  188.     wpSaveState: override;
  189.     wpRestoreState: override;
  190.     wpMenuItemSelected: override;
  191.     wpModifyPopupMenu: override;
  192.     wpFilterPopupMenu: override;
  193.     wpOpen: override;
  194.     wpMenuItemHelpSelected: override;
  195.  
  196.     //# Data Modifiers
  197.  
  198.  
  199.   };
  200. #endif /* __SOMIDL__ */
  201. };
  202.  
  203. interface M_WPPalette
  204. {
  205.   PSZ wpclsQueryEditString();
  206.  
  207.  
  208.  
  209. #ifdef __SOMIDL__
  210.   implementation {
  211.  
  212.     releaseorder: wpclsQueryEditString;
  213.  
  214.     //# Class Modifiers
  215.     externalstem = wppal;
  216.     local;
  217.     externalprefix = palM_;
  218.     majorversion = 1;
  219.     minorversion = 2;
  220.     filestem = wppalet;
  221.     callstyle = oidl;
  222.     dllname = "wpconfig.dll";
  223.  
  224.     //# Method Modifiers
  225.     wpclsQueryTitle: override;
  226.     wpclsQueryStyle: override;
  227.     wpclsQueryDefaultView: override;
  228.     wpclsQueryDefaultHelp: override;
  229.  
  230.   };
  231. #endif /* __SOMIDL__ */
  232. };
  233.  
  234. #endif  /* wppalet_idl */
  235.