source: trunk/gotcha.h@ 150

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

Changes to remove obsolete help files; select language based on system language; remove language selection from Gotcha! Quiet; Combine program and help language selection in Gotcha. Changes to get Gotcha! Quiet working in ArcaOS installer.

  • Property svn:eol-style set to native
File size: 3.4 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 0
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 BOOL g_installer;
71extern CHAR g_installerSavePath[_MAX_PATH];
72extern CHAR g_installerINI[_MAX_PATH];
73extern HAB hab;
74#define GETHAB hab
75
76extern PSETTINGS pset;
77extern HWND hwndFrame, hwndSnapshot, g_hwndMenuSSW, g_hwndSettingsDialog, g_hwndPage0;
78
79extern HMODULE g_hmod;
80#define GETMODULE g_hmod
81
82extern class Helper *g_phelp;
83
84BOOL CheckCmdlineArgs (int argc, char *argv[]);
85
86HWND CreateMainWindow (VOID);
87HWND CreateSnapshotWindow (VOID);
88
89VOID Drag (HWND hwnd);
90
91HBITMAP CaptureWindow (HWND hwnd, HWND hwndParent, PRECTL prcl, BOOL f);
92VOID SaveBitmap (HBITMAP hbm, HPS hps, int width, int height,
93 int bitCount, char *title);
94VOID SaveBitmapToClipboard (HBITMAP hbm);
95//VOID SaveBitmapToFile (HBITMAP hbm, PSZ psz, HPS hps);
96VOID StartSelection (HWND hwnd);
97BOOL SelectSaveFile (char *title);
98BOOL DoTracking (RECTL *prclTrack);
99VOID AddSysMenuItem (HWND hwndFrame, MENUITEM *Item, PSZ Text);
100
101VOID AboutBox (HWND hwnd);
102
103MRESULT EXPENTRY
104 WindowProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
105MRESULT EXPENTRY
106 FrameProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
107MRESULT EXPENTRY
108 wpSnapshot (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
109MRESULT EXPENTRY
110 wpNewButton (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
111
112MRESULT EXPENTRY
113 FileDLGProcedure (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
114
115PSZ AddExtensionToFilename( PSZ psz );
116
117VOID DisplayError (PSZ pszTitle, PSZ psz, ...);
118#if 0
119APIRET saymsg2(int DefaultButton, HWND hwnd,
120 PCSZ pszTitle, PCSZ pszFmt, ...);
121#endif
122VOID DoCountdown (ULONG ul);
123VOID AdjustSaveTypeButtons (BOOL f);
124
125//BOOL SetEAs (PSZ psz);
126VOID SetIdlePriority (BOOL f);
127
128#ifdef _DOLOGMEM_
129VOID LogMem (PSZ psz, BOOL f);
130#endif
131
132#ifdef _DOLOGDEBUG_
133VOID LogDebug( PSZ psz, ... );
134#endif
135
136#endif
Note: See TracBrowser for help on using the repository browser.