home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Graphics / Graphics.zip / gotch175.zip / src / gotcha.h < prev    next >
C/C++ Source or Header  |  2002-12-28  |  3KB  |  125 lines

  1. /***
  2.  This file belongs to the Gotcha! distribution.
  3.  Copyright (C) 1998-2002 Thorsten Thielen <thth@gmx.net>
  4.  
  5.  This program is free software; you can redistribute it and/or modify
  6.  it under the terms of the GNU General Public License as published by
  7.  the Free Software Foundation; either version 2 of the License, or
  8.  (at your option) any later version.
  9.  
  10.  This program 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
  13.  GNU General Public License for more details.
  14.  
  15.  You should have received a copy of the GNU General Public License
  16.  along with this program; if not, write to the Free Software
  17.  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18.  ***/
  19.  
  20. #ifndef _GOTCHA_H_
  21. #define _GOTCHA_H_
  22.  
  23. #define INCL_PM
  24. #define INCL_GPI
  25. #define INCL_DOS
  26. #define INCL_DOSERRORS
  27. #define INCL_DOSMODULEMGR
  28. #define INCL_DOSRESOURCES
  29. #define INCL_WINHELP
  30.  
  31. #define OS2EMX_PLAIN_CHAR
  32.  
  33. #include <os2.h>
  34.  
  35. #include <memory.h>
  36. #include <stdlib.h>
  37. #include <stdio.h>
  38. #include <stdarg.h>
  39.  
  40. #include "mmioos2.h"
  41.  
  42. #include "config.h"
  43.  
  44. #include "id.h"
  45. #include "rstring.h"
  46. #include "version.h"
  47. #include "helper.h"
  48. #include "settings.h"
  49.  
  50. #define PSZ_EXTENSION    ".bmp"
  51.  
  52. typedef class Settings SETTINGS;
  53. typedef SETTINGS *PSETTINGS;
  54.  
  55. enum
  56. {
  57.     STATE_IDLE, STATE_WAITFORHIDE, STATE_SELECTWINDOW, STATE_WINDOWSELECTED,
  58.     STATE_CAPTURE, STATE_WAITFORHIDE2,
  59. };
  60.  
  61. enum
  62. {
  63.     CAP_SCREEN, CAP_SCREENREGION, CAP_WINDOW, CAP_WINDOWINT,
  64. };
  65.  
  66. extern HAB hab;
  67. #define GETHAB hab
  68.  
  69. extern PSETTINGS pset;
  70. extern HWND hwndFrame, hwndSnapshot, g_hwndMenuSSW;
  71.  
  72. extern HMODULE g_hmod;
  73. #define GETMODULE g_hmod
  74.  
  75. extern class Helper *g_help;
  76.  
  77. BOOL CheckCmdlineArgs (int argc, char *argv[]);
  78.  
  79. HWND     CreateMainWindow (VOID);
  80. HWND     CreateSnapshotWindow (VOID);
  81.  
  82. VOID     Drag (HWND hwnd);
  83.  
  84. HBITMAP  CaptureWindow (HWND hwnd, HWND hwndParent, PRECTL prcl, BOOL f);
  85. VOID     SaveBitmap (HBITMAP hbm, HPS hps);
  86. VOID     SaveBitmapToClipboard (HBITMAP hbm);
  87. VOID     SaveBitmapToFile (HBITMAP hbm, PSZ psz, HPS hps);
  88. VOID     StartSelection (HWND hwnd);
  89. BOOL     SelectSaveFile (VOID);
  90. BOOL     DoTracking (RECTL *prclTrack);
  91. VOID     AddSysMenuItem (HWND hwndFrame, MENUITEM *Item, PSZ Text);
  92.  
  93. VOID     AboutBox (HWND hwnd);
  94.  
  95. MRESULT EXPENTRY
  96.     WindowProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
  97. MRESULT EXPENTRY
  98.     FrameProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
  99. MRESULT EXPENTRY
  100.     wpSnapshot (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
  101. MRESULT EXPENTRY
  102.     wpNewButton (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
  103.  
  104. MRESULT EXPENTRY
  105.     FileDLGProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
  106.  
  107. PSZ AddExtensionToFilename( PSZ psz );
  108.  
  109. VOID     DisplayError (PSZ pszTitle, PSZ psz, ...);
  110. VOID     DoCountdown (ULONG ul);
  111. VOID     AdjustSaveTypeButtons (BOOL f);
  112.  
  113. BOOL SetEAs (PSZ psz);
  114. VOID SetIdlePriority (BOOL f);
  115.  
  116. #ifdef _DOLOGMEM_
  117. VOID LogMem (PSZ psz, BOOL f);
  118. #endif
  119.  
  120. #ifdef _DOLOGDEBUG_
  121. VOID LogDebug( PSZ psz, ... );
  122. #endif
  123.  
  124. #endif
  125.