source: trunk/gotcha.h@ 94

Last change on this file since 94 was 94, checked in by Gregg Young, 4 years ago

Add unicode support; Add -i switch for AOS install to GQ; Remove language selection from GQ; Remove help file lang selection from Gotcha; Clean up and rework dialogs/strings

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