home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / samples / pm / bmpsamp / globals.h < prev    next >
C/C++ Source or Header  |  1999-05-11  |  6KB  |  143 lines

  1. /******************************************************************************
  2. *
  3. *  File Name   : GLOBALS.H
  4. *
  5. *  Description : global data header for Jigsaw
  6. *
  7. *  Copyright (C) 1992 IBM Corporation
  8. *
  9. *      DISCLAIMER OF WARRANTIES.  The following [enclosed] code is
  10. *      sample code created by IBM Corporation. This sample code is not
  11. *      part of any standard or IBM product and is provided to you solely
  12. *      for  the purpose of assisting you in the development of your
  13. *      applications.  The code is provided "AS IS", without
  14. *      warranty of any kind.  IBM shall not be liable for any damages
  15. *      arising out of your use of the sample code, even if they have been
  16. *      advised of the possibility of such damages.                                                    *
  17. *
  18. ******************************************************************************/
  19.  
  20. /* ------------------------ general definitions ----------------------------- */
  21.  
  22. extern HAB      habMain;          /* main thread anchor block handle*/
  23. extern HMQ      hmqMain;          /* main thread queue handle*/
  24. extern HWND     hwndFrame;        /* frame control handle*/
  25. extern HWND     hwndClient;       /* client area handle*/
  26. extern HWND     hwndMenu;         /* Menu handle*/
  27. extern HDC      hdcClient;        /* window dc handle*/
  28. extern HPS      hpsClient;        /* client area Gpi ps handle*/
  29. extern SIZEL    sizlMaxClient;    /* max client area size*/
  30. extern HPS      hpsPaint;         /* ps for use in Main Thread*/
  31. extern HRGN     hrgnInvalid;      /* handle to the invalid region*/
  32.  
  33. extern HAB      habAsync;         /* async thread anchor block handle*/
  34. extern HMQ      hmqAsync;         /* async thread queue handle*/
  35. extern TID      tidAsync;         /* async thread id*/
  36. extern SEL      selStack;         /* async thread stack selector*/
  37. extern SHORT    sPrty;            /* async thread priority*/
  38.  
  39. extern HWND     hwndHorzScroll;   /* horizontal scroll bar window*/
  40. extern HWND     hwndVertScroll;   /* vertical scroll bar window*/
  41.  
  42. extern POINTS   ptsScrollPos;
  43. extern POINTS   ptsOldScrollPos;
  44. extern POINTS   ptsScrollMax;
  45. extern POINTS   ptsHalfScrollMax;
  46. extern POINTS   ptsScrollLine;
  47. extern POINTS   ptsScrollPage;
  48.  
  49. extern MATRIXLF matlfIdentity;
  50. extern LONG     lScale;           /* current zoom level*/
  51. extern POINTL   ptlScaleRef;      /* scalefactor, detects size change*/
  52.  
  53. extern POINTL   ptlOffset;
  54. extern POINTL   ptlBotLeft;
  55. extern POINTL   ptlTopRight;
  56. extern POINTL   ptlMoveStart;     /* model space point at start of move*/
  57. extern LONG     lLastSegId;       /* last segment id assigned to a piece*/
  58. extern LONG     lPickedSeg;       /* seg id of piece selected for drag*/
  59. extern POINTL   ptlOffStart;      /* segment xform xlate at move start*/
  60. extern RECTL    rclBounds;        /* pict bounding box in model coords.*/
  61. extern POINTL   ptlOldMouse;      /* current mouse posn*/
  62. extern POINTL   ptlMouse;         /* current mouse posn*/
  63. extern BOOL     fButtonDownMain;  /* only drag if mouse down*/
  64. extern BOOL     fButtonDownAsync; /* only drag if mouse down*/
  65.  
  66. extern POINTL   ptlUpdtRef;
  67. extern POINTL   aptlUpdt[3];
  68. extern BOOL     fUpdtFirst;
  69. extern BOOL     fFirstLoad;
  70. extern BOOL     fPictureAssembled;
  71.  
  72. /* -------------------------- segment list --------------------------------- */
  73.  
  74. extern PSEGLIST pslHead;          /* head of the list*/
  75. extern PSEGLIST pslTail;          /* tail of the list*/
  76. extern PSEGLIST pslPicked;        /* picked segment's list member*/
  77.  
  78. /*-------------------------- bitmap-related data --------------------------- */
  79.  
  80. extern LOADINFO           li;
  81. extern PLOADINFO          pli;
  82.  
  83. extern HPS                hpsBitmapFile;      /* bitmap straight from the file*/
  84.  
  85. extern HDC                hdcBitmapFile;
  86. extern HBITMAP            hbmBitmapFile;
  87.  
  88. extern BITMAPINFOHEADER2  bmp2BitmapFile;
  89. extern PBITMAPINFOHEADER2 pbmp2BitmapFile;
  90. extern BITMAPINFOHEADER2  bmp2BitmapFileRef;
  91. extern PBITMAPINFOHEADER2 pbmp2BitmapFileRef;
  92.  
  93. extern HPS                hpsBitmapSize;      /* bitmap sized to the current*/
  94.                                               /* size*/
  95. extern HDC                hdcBitmapSize;
  96. extern HBITMAP            hbmBitmapSize;
  97.  
  98. extern HPS                hpsBitmapBuff;      /* image composed here, copied to*/
  99.                                               /* screen*/
  100. extern HDC                hdcBitmapBuff;
  101. extern HBITMAP            hbmBitmapBuff;
  102.  
  103. extern HPS                hpsBitmapSave;      /* save part of screen during*/
  104.                                               /* dragging*/
  105. extern HDC                hdcBitmapSave;
  106. extern HBITMAP            hbmBitmapSave;
  107.  
  108. extern BITMAPINFOHEADER2  bmp2BitmapSave;
  109. extern PBITMAPINFOHEADER2 pbmp2BitmapSave;
  110.  
  111. extern DEVOPENSTRUC       dop;
  112.  
  113. /* -------------------------- Miscellaneous ------------------------------- */
  114.  
  115. /*
  116.  *   These event semaphores are loosely used to signal events between Jigsaw's
  117.  *   two threads.  No DosWaitEventSem() calls are made at this time, since,
  118.  *   without reworking the code, this could block out a thread that should
  119.  *   continually process the message queue.  Semaphores are "Reset" while
  120.  *   being used (to signal event) and "Posted" when the event is over.
  121.  */
  122.  
  123. extern HEV hevTerminate;    /* event semaphore - terminating Jigsaw...        */
  124. extern HEV hevDrawOn;       /* enable/disable drawing                         */
  125. extern HEV hevMouse;        /* enable/disable mouse tracking                  */
  126. extern HEV hevLoadingBitmap;/* event semaphore - loading a bitmap file        */
  127. extern HEV hevKillDraw;     /* event semaphore - stop drawing                 */
  128.  
  129. extern PSZ     pszBlankMsg;
  130.  
  131. extern SWCNTRL swctl;
  132. extern HSWITCH hsw;                         /* handle to a switch list entry  */
  133. extern char    szTitle[80];                 /* Title bar text                 */
  134. extern char    szErrorTitle[80];            /* error Title bar text           */
  135.  
  136. extern BOOL    fErrMem;                     /* set if alloc async stack fails */
  137.  
  138. extern LONG    lByteAlignX, lByteAlignY;    /* memory alignment constants     */
  139. extern BOOL    BmpLoaded;
  140.  
  141. extern USHORT  Currentchecked;
  142.  
  143.