source: trunk/gotcha.h@ 27

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

Remove mmio code; Ticet #5 Get gotcha "quiet" version working Tickets #1 #7 #9 Dialog changes related to both "quiet" and regular modes ( dialogs still need to be split in order to build both; only "quite can be bult from this) See Ticket #9 for a more complete list of changes.

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