home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / wvis0626.zip / warpvision_20020626.zip / libDIVEpm.h < prev    next >
C/C++ Source or Header  |  2002-06-19  |  3KB  |  105 lines

  1. /*
  2.     OS/2 DIVE class library: Private header file
  3.     Copyright (C) 1997 by Andrew Zabolotny <bit@eltech.ru>
  4.  
  5.     This library is free software; you can redistribute it and/or
  6.     modify it under the terms of the GNU Library General Public
  7.     License as published by the Free Software Foundation; either
  8.     version 2 of the License, or (at your option) any later version.
  9.  
  10.     This library is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13.     Library General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU Library General Public
  16.     License along with this library; if not, write to the Free
  17.     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. */
  19.  
  20. #ifndef __LIBDIVEPM_H__
  21. #define __LIBDIVEPM_H__
  22.  
  23. /*----------------------------------------------- PM worker thread interface -*/
  24. enum
  25. {
  26.   pmcmdCreateWindow,                    // PM thread command: Create a window
  27.   pmcmdDestroyWindow,                   // PM thread command: Destroy the window
  28.   pmcmdCreateDIVEctx,                   // PM thread command: Create DIVE context
  29.   pmcmdDestroyDIVEctx,                  // PM thread command: Destroy DIVE context
  30.   pmcmdBindDIVEctx,                     // PM thread command: Bind DIVE ctx to a window
  31.   pmcmdUnbindDIVEctx,                   // PM thread command: Unbind DIVE ctx from window
  32.   pmcmdShowWindow,                      // PM thread command: Show/hide DIVE window
  33.   pmcmdResizeWindow,                    // PM thread command: Resize DIVE window
  34.   pmcmdLocateWindow                     // PM thread command: Set DIVE window position
  35. };
  36.  
  37. enum
  38. {
  39.   pmrcOK,                               // PM thread return code: OK
  40.   pmrcWindowCreationError,              // return code:    Cannot create PM window
  41.   pmrcDIVEfailure,                      // return code:    DIVE subsystem failure
  42.   pmrcNotInitialized,                   // return code: Subsystem not initialized
  43.   pmrcBadWindow,                        // return code: Bad window handle
  44.   pmrcNotBound                          // return code: DIVE context not bound to any window
  45. };
  46.  
  47. struct PMrq
  48. {
  49.   u_int rc;                             // PM server return code
  50.   union
  51.   {
  52.     struct
  53.     {
  54.       const char *Title;
  55.       HWND Handle;
  56.     } CreateWindow;
  57.     struct
  58.     {
  59.       HWND Handle;
  60.     } DestroyWindow;
  61.     struct
  62.     {
  63.       FGVideoMode *Mode;
  64.       diveWindow *dW;
  65.     } CreateCtx;
  66.     struct
  67.     {
  68.       diveWindow *dW;
  69.     } DestroyCtx;
  70.     struct
  71.     {
  72.       diveWindow *dW;
  73.       HWND Handle;
  74.       long DesktopW;
  75.       long DesktopH;
  76.     } BindCtx;
  77.     struct
  78.     {
  79.       diveWindow *dW;
  80.       int State;
  81.     } ShowWin;
  82.     struct
  83.     {
  84.       diveWindow *dW;
  85.       int Width, Height;
  86.       bool Center;
  87.     } Resize;
  88.     struct
  89.     {
  90.       diveWindow *dW;
  91.       int x, y;
  92.     } Locate;
  93.   } Parm;
  94. };
  95.  
  96. // Do a single transaction with PM thread
  97. extern u_int PMcall (long Command, void *rq);
  98.  
  99. extern HMODULE gdMH;                    // Device driver module (DLL) handle
  100.  
  101. extern bool gdDiveInitialize ();
  102. extern bool gdDiveDeinitialize ();
  103.  
  104. #endif // __LIBDIVEPM_H__
  105.