source: trunk/gotcha.h@ 2

Last change on this file since 2 was 2, checked in by Gregg Young, 8 years ago

Gotcha 1.78 source from Hobbes

  • Property svn:eol-style set to native
File size: 3.0 KB
Line 
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
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
52typedef class Settings SETTINGS;
53typedef SETTINGS *PSETTINGS;
54
55enum
56{
57 STATE_IDLE, STATE_WAITFORHIDE, STATE_SELECTWINDOW, STATE_WINDOWSELECTED,
58 STATE_CAPTURE, STATE_WAITFORHIDE2,
59};
60
61enum
62{
63 CAP_SCREEN, CAP_SCREENREGION, CAP_WINDOW, CAP_WINDOWINT,
64};
65
66extern HAB hab;
67#define GETHAB hab
68
69extern PSETTINGS pset;
70extern HWND hwndFrame, hwndSnapshot, g_hwndMenuSSW;
71
72extern HMODULE g_hmod;
73#define GETMODULE g_hmod
74
75extern class Helper *g_help;
76
77BOOL CheckCmdlineArgs (int argc, char *argv[]);
78
79HWND CreateMainWindow (VOID);
80HWND CreateSnapshotWindow (VOID);
81
82VOID Drag (HWND hwnd);
83
84HBITMAP CaptureWindow (HWND hwnd, HWND hwndParent, PRECTL prcl, BOOL f);
85VOID SaveBitmap (HBITMAP hbm, HPS hps);
86VOID SaveBitmapToClipboard (HBITMAP hbm);
87VOID SaveBitmapToFile (HBITMAP hbm, PSZ psz, HPS hps);
88VOID StartSelection (HWND hwnd);
89BOOL SelectSaveFile (VOID);
90BOOL DoTracking (RECTL *prclTrack);
91VOID AddSysMenuItem (HWND hwndFrame, MENUITEM *Item, PSZ Text);
92
93VOID AboutBox (HWND hwnd);
94
95MRESULT EXPENTRY
96 WindowProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
97MRESULT EXPENTRY
98 FrameProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
99MRESULT EXPENTRY
100 wpSnapshot (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
101MRESULT EXPENTRY
102 wpNewButton (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
103
104MRESULT EXPENTRY
105 FileDLGProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
106
107PSZ AddExtensionToFilename( PSZ psz );
108
109VOID DisplayError (PSZ pszTitle, PSZ psz, ...);
110VOID DoCountdown (ULONG ul);
111VOID AdjustSaveTypeButtons (BOOL f);
112
113BOOL SetEAs (PSZ psz);
114VOID SetIdlePriority (BOOL f);
115
116#ifdef _DOLOGMEM_
117VOID LogMem (PSZ psz, BOOL f);
118#endif
119
120#ifdef _DOLOGDEBUG_
121VOID LogDebug( PSZ psz, ... );
122#endif
123
124#endif
Note: See TracBrowser for help on using the repository browser.