source: trunk/gotcha.h@ 10

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

The changes in these files were made to fix Open Watcom compiler, WRC and wipfc errors and warning. There are several more in the next commit.

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