]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/app.h
Somehow, setting a tint color makes gauge work :/.
[wxWidgets.git] / include / wx / cocoa / app.h
CommitLineData
fb896a32 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: wx/cocoa/app.h
fb896a32
DE
3// Purpose: wxApp class
4// Author: David Elliott
5// Modified by:
6// Created: 2002/11/27
fb896a32 7// Copyright: (c) 2002 David Elliott
65571936 8// Licence: wxWindows licence
fb896a32
DE
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_COCOA_APP_H_
12#define _WX_COCOA_APP_H_
13
047c1182
DE
14typedef struct __CFRunLoopObserver * CFRunLoopObserverRef;
15typedef const struct __CFString * CFStringRef;
16
ef0e9220 17#include "wx/osx/core/cfref.h"
047c1182 18
cdd0a08f
DE
19// ========================================================================
20// wxApp
21// ========================================================================
fb896a32
DE
22// Represents the application. Derive OnInit and declare
23// a new App object to start application
53a2db12 24class WXDLLIMPEXP_CORE wxApp: public wxAppBase
fb896a32
DE
25{
26 DECLARE_DYNAMIC_CLASS(wxApp)
fb896a32
DE
27// ------------------------------------------------------------------------
28// initialization
29// ------------------------------------------------------------------------
30public:
31 wxApp();
047c1182 32 virtual ~wxApp();
fb896a32
DE
33
34// ------------------------------------------------------------------------
35// Cocoa specifics
36// ------------------------------------------------------------------------
37public:
38 inline WX_NSApplication GetNSApplication() { return m_cocoaApp; }
0187ddb4
DE
39 virtual void CocoaDelegate_applicationWillBecomeActive();
40 virtual void CocoaDelegate_applicationDidBecomeActive();
41 virtual void CocoaDelegate_applicationWillResignActive();
42 virtual void CocoaDelegate_applicationDidResignActive();
047c1182
DE
43 virtual void CocoaDelegate_applicationWillUpdate();
44 virtual void CF_ObserveMainRunLoopBeforeWaiting(CFRunLoopObserverRef observer, int activity);
fb896a32
DE
45protected:
46 WX_NSApplication m_cocoaApp;
0187ddb4 47 struct objc_object *m_cocoaAppDelegate;
14fc7eb4 48 WX_NSThread m_cocoaMainThread;
047c1182
DE
49 wxCFRef<CFRunLoopObserverRef> m_cfRunLoopIdleObserver;
50 wxCFRef<CFStringRef> m_cfObservedRunLoopMode;
fb896a32
DE
51
52// ------------------------------------------------------------------------
53// Implementation
54// ------------------------------------------------------------------------
55public:
56 // Implement wxAppBase pure virtuals
e2478fde
VZ
57 virtual void Exit();
58
eb537cfb 59 virtual void WakeUpIdle();
d48b06bd 60
05e2b077 61 virtual bool Initialize(int& argc, wxChar **argv);
94826170 62 virtual void CleanUp();
47f1ad6a
DE
63 virtual bool CallOnInit();
64
d48b06bd 65
fb896a32
DE
66 virtual bool OnInit();
67 virtual bool OnInitGui();
b93d8cc4 68
879180b6
DE
69 // Set true _before_ initializing wx to force embedded mode (no app delegate, etc.)
70 static bool sm_isEmbedded;
fb896a32
DE
71};
72
73#endif // _WX_COCOA_APP_H_