]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/app.h
have CGImage Support in all OSX builds
[wxWidgets.git] / include / wx / os2 / app.h
CommitLineData
0e320a79
DW
1/////////////////////////////////////////////////////////////////////////////
2// Name: app.h
3// Purpose: wxApp class
d88de032 4// Author: David Webster
0e320a79 5// Modified by:
d88de032 6// Created: 10/13/99
0e320a79 7// RCS-ID: $Id$
d88de032 8// Copyright: (c) David Webster
65571936 9// Licence: wxWindows licence
0e320a79
DW
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_APP_H_
13#define _WX_APP_H_
14
19193a2c
KB
15#ifdef __WATCOMC__
16
17#include <sys/ioctl.h>
18#include <sys/select.h>
19
20#else
21
3958ae62
SN
22#include <sys/time.h>
23#include <sys/types.h>
29108552
DW
24
25#ifdef __EMX__
3958ae62 26#include <unistd.h>
29108552
DW
27#else
28#include <utils.h>
29#undef BYTE_ORDER
30#include <types.h>
29108552
DW
31#define INCL_ORDERS
32#endif
3958ae62 33
19193a2c
KB
34#endif
35
0e320a79 36#include "wx/event.h"
d88de032 37#include "wx/icon.h"
0e320a79
DW
38
39class WXDLLEXPORT wxFrame;
40class WXDLLEXPORT wxWindow;
3958ae62 41class WXDLLEXPORT wxApp;
0e320a79
DW
42class WXDLLEXPORT wxKeyEvent;
43class WXDLLEXPORT wxLog;
44
0e320a79 45WXDLLEXPORT_DATA(extern wxApp*) wxTheApp;
43543d98 46WXDLLEXPORT_DATA(extern HAB) vHabmain;
0e320a79
DW
47
48// Force an exit from main loop
9ed0fac8 49void WXDLLEXPORT wxExit(void);
0e320a79
DW
50
51// Yield to other apps/messages
9ed0fac8 52bool WXDLLEXPORT wxYield(void);
0e320a79 53
8c5907ce
DW
54extern MRESULT EXPENTRY wxWndProc( HWND
55 ,ULONG
56 ,MPARAM
57 ,MPARAM
58 );
59
3958ae62 60
0e320a79
DW
61// Represents the application. Derive OnInit and declare
62// a new App object to start application
d88de032 63class WXDLLEXPORT wxApp : public wxAppBase
0e320a79 64{
d88de032 65 DECLARE_DYNAMIC_CLASS(wxApp)
0e320a79 66
d88de032
DW
67public:
68 wxApp();
69 virtual ~wxApp();
0e320a79 70
d88de032 71 // override base class (pure) virtuals
598dc9b7
SN
72 virtual bool Initialize(int& argc, wxChar **argv);
73 virtual void CleanUp(void);
e2478fde 74
598dc9b7 75 virtual bool OnInitGui(void);
e2478fde 76
8461e4c2 77 virtual bool Yield(bool onlyIfNeeded = FALSE);
e2478fde 78 virtual void WakeUpIdle(void);
0e320a79 79
9ed0fac8
DW
80 virtual void SetPrintMode(int mode) { m_nPrintMode = mode; }
81 virtual int GetPrintMode(void) const { return m_nPrintMode; }
0e320a79 82
d88de032 83 // implementation only
9ed0fac8
DW
84 void OnIdle(wxIdleEvent& rEvent);
85 void OnEndSession(wxCloseEvent& rEvent);
86 void OnQueryEndSession(wxCloseEvent& rEvent);
0e320a79 87
3958ae62
SN
88 int AddSocketHandler(int handle, int mask,
89 void (*callback)(void*), void * gsock);
90 void RemoveSocketHandler(int handle);
91 void HandleSockets();
92
0e320a79 93protected:
9ed0fac8
DW
94 bool m_bShowOnInit;
95 int m_nPrintMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
0e320a79 96
9ed0fac8
DW
97 //
98 // PM-specific wxApp definitions */
99 //
3958ae62 100private:
29108552
DW
101 int m_maxSocketHandles;
102 int m_maxSocketNr;
103 int m_lastUsedHandle;
104 fd_set m_readfds;
105 fd_set m_writefds;
106 void* m_sockCallbackInfo;
3958ae62 107
d88de032 108public:
0e320a79 109
d88de032 110 // Implementation
9ed0fac8 111 static bool RegisterWindowClasses(HAB vHab);
0e320a79
DW
112
113public:
9ed0fac8 114 int m_nCmdShow;
3958ae62 115 HMQ m_hMq;
0e320a79
DW
116
117protected:
d88de032 118 DECLARE_EVENT_TABLE()
598dc9b7 119 DECLARE_NO_COPY_CLASS(wxApp)
0e320a79 120};
0e320a79
DW
121#endif
122 // _WX_APP_H_
123