[2] | 1 | /***
|
---|
| 2 | This file belongs to the Gotcha! distribution.
|
---|
| 3 | Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de>
|
---|
| 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
|
---|
[10] | 30 | #define INCL_MMIOOS2
|
---|
[2] | 31 |
|
---|
| 32 | #define OS2EMX_PLAIN_CHAR
|
---|
| 33 |
|
---|
| 34 | #include <os2.h>
|
---|
| 35 |
|
---|
| 36 | #include <memory.h>
|
---|
| 37 | #include <stdlib.h>
|
---|
| 38 | #include <stdio.h>
|
---|
| 39 | #include <stdarg.h>
|
---|
| 40 |
|
---|
| 41 | #include "mmioos2.h"
|
---|
| 42 |
|
---|
| 43 | #include "config.h"
|
---|
| 44 |
|
---|
| 45 | #include "id.h"
|
---|
| 46 | #include "rstring.h"
|
---|
| 47 | #include "version.h"
|
---|
| 48 | #include "helper.h"
|
---|
| 49 | #include "settings.h"
|
---|
| 50 |
|
---|
| 51 | #define PSZ_EXTENSION ".bmp"
|
---|
| 52 |
|
---|
| 53 | typedef class Settings SETTINGS;
|
---|
| 54 | typedef SETTINGS *PSETTINGS;
|
---|
| 55 |
|
---|
| 56 | enum
|
---|
| 57 | {
|
---|
| 58 | STATE_IDLE, STATE_WAITFORHIDE, STATE_SELECTWINDOW, STATE_WINDOWSELECTED,
|
---|
| 59 | STATE_CAPTURE, STATE_WAITFORHIDE2,
|
---|
| 60 | };
|
---|
| 61 |
|
---|
| 62 | enum
|
---|
| 63 | {
|
---|
| 64 | CAP_SCREEN, CAP_SCREENREGION, CAP_WINDOW, CAP_WINDOWINT,
|
---|
| 65 | };
|
---|
| 66 |
|
---|
| 67 | extern HAB hab;
|
---|
| 68 | #define GETHAB hab
|
---|
| 69 |
|
---|
| 70 | extern PSETTINGS pset;
|
---|
| 71 | extern HWND hwndFrame, hwndSnapshot, g_hwndMenuSSW;
|
---|
| 72 |
|
---|
| 73 | extern HMODULE g_hmod;
|
---|
| 74 | #define GETMODULE g_hmod
|
---|
| 75 |
|
---|
| 76 | extern class Helper *g_help;
|
---|
| 77 |
|
---|
| 78 | BOOL CheckCmdlineArgs (int argc, char *argv[]);
|
---|
| 79 |
|
---|
| 80 | HWND CreateMainWindow (VOID);
|
---|
| 81 | HWND CreateSnapshotWindow (VOID);
|
---|
| 82 |
|
---|
| 83 | VOID Drag (HWND hwnd);
|
---|
| 84 |
|
---|
| 85 | HBITMAP CaptureWindow (HWND hwnd, HWND hwndParent, PRECTL prcl, BOOL f);
|
---|
[10] | 86 | VOID SaveBitmap (HBITMAP hbm, HPS hps, int width, int height, int bitCount);
|
---|
[2] | 87 | VOID SaveBitmapToClipboard (HBITMAP hbm);
|
---|
| 88 | VOID SaveBitmapToFile (HBITMAP hbm, PSZ psz, HPS hps);
|
---|
| 89 | VOID StartSelection (HWND hwnd);
|
---|
| 90 | BOOL SelectSaveFile (VOID);
|
---|
| 91 | BOOL DoTracking (RECTL *prclTrack);
|
---|
| 92 | VOID AddSysMenuItem (HWND hwndFrame, MENUITEM *Item, PSZ Text);
|
---|
| 93 |
|
---|
| 94 | VOID AboutBox (HWND hwnd);
|
---|
| 95 |
|
---|
| 96 | MRESULT EXPENTRY
|
---|
| 97 | WindowProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
|
---|
| 98 | MRESULT EXPENTRY
|
---|
| 99 | FrameProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
|
---|
| 100 | MRESULT EXPENTRY
|
---|
| 101 | wpSnapshot (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
|
---|
| 102 | MRESULT EXPENTRY
|
---|
| 103 | wpNewButton (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
|
---|
| 104 |
|
---|
| 105 | MRESULT EXPENTRY
|
---|
| 106 | FileDLGProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
|
---|
| 107 |
|
---|
| 108 | PSZ AddExtensionToFilename( PSZ psz );
|
---|
| 109 |
|
---|
| 110 | VOID DisplayError (PSZ pszTitle, PSZ psz, ...);
|
---|
| 111 | VOID DoCountdown (ULONG ul);
|
---|
| 112 | VOID AdjustSaveTypeButtons (BOOL f);
|
---|
| 113 |
|
---|
| 114 | BOOL SetEAs (PSZ psz);
|
---|
| 115 | VOID SetIdlePriority (BOOL f);
|
---|
| 116 |
|
---|
| 117 | #ifdef _DOLOGMEM_
|
---|
| 118 | VOID LogMem (PSZ psz, BOOL f);
|
---|
| 119 | #endif
|
---|
| 120 |
|
---|
| 121 | #ifdef _DOLOGDEBUG_
|
---|
| 122 | VOID LogDebug( PSZ psz, ... );
|
---|
| 123 | #endif
|
---|
| 124 |
|
---|
| 125 | #endif
|
---|