home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / TOOLKIT / PM / PALETTE / PALETTE.H < prev    next >
Text File  |  1994-11-17  |  5KB  |  97 lines

  1. /*┌──────────────────────────────────────────────────────────────────────────┐*/
  2. /*│                                                                          │*/
  3. /*│ PROGRAM NAME: PALETTE                                                    │*/
  4. /*│ -------------                                                            │*/
  5. /*│  A PM program demonstrating vector fonts, palette manager APIs, and IPF  │*/
  6. /*│  help.                                                                   │*/
  7. /*│                                                                          │*/
  8. /*│ COPYRIGHT:                                                               │*/
  9. /*│ ----------                                                               │*/
  10. /*│  Copyright (C) International Business Machines Corp., 1992               │*/
  11. /*│                                                                          │*/
  12. /*│ DISCLAIMER OF WARRANTIES:                                                │*/
  13. /*│ -------------------------                                                │*/
  14. /*│  The following [enclosed] code is sample code created by IBM Corporation.│*/
  15. /*│  This sample code is not part of any standard IBM product and is provided│*/
  16. /*│  to you solely for the purpose of assisting you in the development of    │*/
  17. /*│  your applications.  The code is provided "AS IS", without warranty of   │*/
  18. /*│  any kind.  IBM shall not be liable for any damages arising out of your  │*/
  19. /*│  use of the sample code, even if they have been advised of the           │*/
  20. /*│  possibility of such damages.                                            │*/
  21. /*│                                                                          │*/
  22. /*│ For details on what this program does etc., please see the PALETTE.C     │*/
  23. /*│ file.                                                                    │*/
  24. /*│                                                                          │*/
  25. /*└──────────────────────────────────────────────────────────────────────────┘*/
  26.  
  27. /*┌──────────────────────────────────────────────────────────────────────────┐*/
  28. /*│ PALETTE.H                                                                │*/
  29. /*│                                                                          │*/
  30. /*│ Palette Manager Header File                                              │*/
  31. /*└──────────────────────────────────────────────────────────────────────────┘*/
  32.  
  33. /*┌──────────────────────────────────────────────────────────────────────────┐*/
  34. /*│ Constant Definitions                                                     │*/
  35. /*└──────────────────────────────────────────────────────────────────────────┘*/
  36.  
  37. #define ID_WINDOW              1
  38. #define IDM_OPTIONS          100
  39. #define IDM_STARTSTOP        101
  40. #define IDM_SPEED            102
  41. #define IDM_SPEEDSLOW        103
  42. #define IDM_SPEEDMEDIUM      104
  43. #define IDM_SPEEDFAST        105
  44. #define IDM_LOGO             106
  45. #define IDM_LOGOIBM          107
  46. #define IDM_LOGOOS2          108
  47. #define IDM_EXIT             109
  48.  
  49. #define IDM_HELP             200
  50. #define IDM_HELPFORHELP      201
  51. #define IDM_HELPABOUT        202
  52. #define IDM_HELP_INDEX       203
  53. #define IDM_KEYS_HELP        204
  54. #define IDD_PRODUCTINFO      300
  55. #define IDM_ABOUT_OK         301
  56. #define IDR_BITMAP           400
  57. #define IDC_BITMAP           401
  58. #define IDC_OK               402
  59. #define MAIN_HELPTABLE       501
  60. #define SUBTABLE_OPTION      502
  61. #define IDM_EXTENDED_HELP    503
  62.  
  63. #define ID_NULL              9999
  64.  
  65. /*┌──────────────────────────────────────────────────────────────────────────┐*/
  66. /*│ Macro definitions                                                        │*/
  67. /*└──────────────────────────────────────────────────────────────────────────┘*/
  68.  
  69. #define LONGFromRGB(R,G,B) (LONG)(((LONG)R<<16)+((LONG)G<<8)+(LONG)B)
  70.  
  71. /*┌──────────────────────────────────────────────────────────────────────────┐*/
  72. /*│ Function Prototypes                                                      │*/
  73. /*└──────────────────────────────────────────────────────────────────────────┘*/
  74.  
  75. void _System DrawingThread( ULONG );  /* _System linkage not _Optlink    */
  76.                                       /* _Optlink uses Register passing  */
  77.  
  78. FNWP PaletteWndProc;  /* FNWP = Standard _System Callback function prototype */
  79.  
  80. FNWP AboutDlgProc;
  81.  
  82. int main(void);
  83.  
  84. LONG mprintf(PSZ pszFmt, ...);
  85.  
  86. void SetPulldownState( HWND   hwnd,
  87.                        USHORT item,
  88.                        BOOL   state);
  89.  
  90. LONG PaletteInit(VOID);
  91.  
  92. VOID DrawPaletteLines(RECTL rctl,
  93.                       ULONG ulPalCount,
  94.                       HPS hps);
  95. /********************************  end of palette.h  **************************/
  96.  
  97.