1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
#include "util_121.h"
#include "cCrossCallProcedureTable_121.h"
#include "cTCP_121.h"
/* Global data with external references: */
extern CrossCallInfo gCci; /* The global cross call information struct. */
extern int gClipboardCount; /* Keeps track of changes of clipboard. */
extern CrossCallProcedureTable gCrossCallProcedureTable; /* The cross call procedure table. */
extern GtkTooltips *gTooltip; /* The tooltip control. */
#if defined(mingw32_TARGET_OS)
extern char *gAppName; /* The application name. */
extern HINSTANCE ghInst; /* The handle to the instance of the OS thread. */
extern HWND ghMainWindow; /* The handle to the main HWND of the OS thread. */
extern HACCEL gAcceleratorTable; /* Refers to the accelerator table of the active frame. */
extern BOOL gAcceleratorTableIsUpToDate; /* Flag: TRUE iff accelerator table corresponds with active frame. */
extern HWND ghActiveFrameWindow; /* The currently active frame window (MDI/SDI). */
extern HWND ghActiveClientWindow; /* The currently active client window (MDI). */
extern HWND gActiveDialog; /* The currently active dialogue. */
extern HWND ghwndLastModalDialog; /* Keeps track of last modal dialog. */
extern HFONT gDlogFont; /* The handle to the logical FONT that is used in dialogs. */
extern HFONT gControlFont; /* The handle to the logical FONT that is used in all controls. */
extern HWND ghTCPWindow; /* The handle to the TCP HWND of the OS thread. */
/* Menu(item)IDs are not allowed to exceed OSMenuIDEnd.
This is because window ids start at (OSMenuIDEnd+5), and need to be distinct from menu ids
in case of MDI processes.
The global gMenuItemID (initially 0) is incremented by NextMenuItemID each time a new
menu(item)ID is required.
This implementation does not reuse freed ids and is therefore not adequate!!
*/
#define OSMenuIDEnd 10000
extern UINT NextMenuItemID (void);
#endif
/* GetModifiers returns the modifiers that are currently pressed.
*/
extern int GetModifiers (void);
/* Translate virtual key codes to the codes shared with Clean.
If the keycode could not be translated, zero is returned.
*/
extern int CheckVirtualKeyCode (int keycode);
extern void HandleCleanRequest( CrossCallInfo *pcci );
extern OS WinStartOsThread (OS);
extern OS WinKillOsThread (OS);
extern void WinKickOsThread (int,int,int,int,int,int,int,OS,int*,int*,int*,
int*,int*,int*,int*,OS*);
extern void KickCleanThread( CrossCallInfo *pcci );
extern void SendMessageToClean( int mess, int p1,int p2,int p3, int p4,int p5,int p6 );
/* Shorthands for SendMessageToClean: */
#define SendMessage0ToClean(mess) SendMessageToClean((mess), 0,0,0,0,0,0)
#define SendMessage1ToClean(mess, p1) SendMessageToClean((mess), (int64_t)(p1),0,0,0,0,0)
#define SendMessage2ToClean(mess, p1,p2) SendMessageToClean((mess), (int64_t)(p1),(int64_t)(p2),0,0,0,0)
#define SendMessage3ToClean(mess, p1,p2,p3) SendMessageToClean((mess), (int64_t)(p1),(int64_t)(p2),(int64_t)(p3),0,0,0)
#define SendMessage4ToClean(mess, p1,p2,p3,p4) SendMessageToClean((mess), (int64_t)(p1),(int64_t)(p2),(int64_t)(p3),(int64_t)(p4),0,0)
#define SendMessage5ToClean(mess, p1,p2,p3,p4,p5) SendMessageToClean((mess), (int64_t)(p1),(int64_t)(p2),(int64_t)(p3),(int64_t)(p4),(int64_t)(p5),0)
#define SendMessage6ToClean(mess, p1,p2,p3,p4,p5,p6) SendMessageToClean((mess), (int64_t)(p1),(int64_t)(p2),(int64_t)(p3),(int64_t)(p4),(int64_t)(p5),(int64_t)(p6))
/* Prototypes of convenience functions that fill CrossCallInfo struct. */
extern CrossCallInfo *MakeReturn0Cci (CrossCallInfo * pcci);
extern CrossCallInfo *MakeReturn1Cci (CrossCallInfo * pcci, int64_t v);
extern CrossCallInfo *MakeReturn2Cci (CrossCallInfo * pcci, int64_t v1, int64_t v2);
extern CrossCallInfo *MakeReturn3Cci (CrossCallInfo * pcci, int64_t v1, int64_t v2, int64_t v3);
extern CrossCallInfo *MakeReturn4Cci (CrossCallInfo * pcci, int64_t v1, int64_t v2, int64_t v3, int64_t v4);
extern CrossCallInfo *MakeReturn5Cci (CrossCallInfo * pcci, int64_t v1, int64_t v2, int64_t v3, int64_t v4, int64_t v5);
extern CrossCallInfo *MakeReturn6Cci (CrossCallInfo * pcci, int64_t v1, int64_t v2, int64_t v3, int64_t v4, int64_t v5, int64_t v6);
extern BOOL IsReturnCci( CrossCallInfo *pcci );
extern void WinInitOs (gboolean*, OS*);
extern gboolean WinCloseOs (OS os);
extern char* WinGetAppPath (void);
extern CLEAN_STRING WinGetModulePath (void);
extern void WinFileModifiedDate (CLEAN_STRING name, gboolean* exists, int *yy, int *mm, int *dd, int *h, int *m, int *s);
extern gboolean WinFileExists (CLEAN_STRING);
extern void WinCallProcess(char*,char*,char*,char*,char*,char*,OS,Bool*,int*,OS*);
extern void WinLaunchApp(CLEAN_STRING,BOOL,OS,Bool*,OS*);
extern void WinLaunchApp2(CLEAN_STRING,CLEAN_STRING,BOOL,OS,Bool*,OS*);
|