]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/NSApplication.h
use wxEventType coherently with the docs
[wxWidgets.git] / include / wx / cocoa / NSApplication.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/NSApplication.h
3 // Purpose: wxNSApplicationDelegate definition
4 // Author: David Elliott
5 // Modified by:
6 // Created: 2004/01/26
7 // RCS-ID: $Id$
8 // Copyright: (c) 2003,2004 David Elliott
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_COCOA_NSAPPLICATION_H__
13 #define _WX_COCOA_NSAPPLICATION_H__
14
15 #include "wx/cocoa/objc/objc_uniquifying.h"
16
17 // ========================================================================
18 // wxNSApplicationDelegate
19 // ========================================================================
20 /*!
21 @class wxNSApplicationDelegate
22 @discussion Implements an NSApplication delegate which can respond to messages sent by Cocoa to change Cocoa's behavior.
23
24 wxCocoa will set a singleton instance of this class as the NSApplication delegate upon startup unless wxWidgets is running
25 in a "plugin" manner in which case it would not be appropriate to do this.
26
27 Although Cocoa will send notifications to the delegate it is also possible to register a different object to listen for
28 them. Because we want to support the plugin case, we use a separate notification observer object when we can.
29 */
30 @interface wxNSApplicationDelegate : NSObject
31 {
32 }
33
34 // Delegate methods
35 - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication;
36 @end // interface wxNSApplicationDelegate : NSObject
37 WX_DECLARE_GET_OBJC_CLASS(wxNSApplicationDelegate,NSObject)
38
39 // ========================================================================
40 // wxNSApplicationObserver
41 // ========================================================================
42 /*!
43 @class wxNSApplicationObserver
44 @discussion Observes most notifications sent by the NSApplication singleton.
45
46 wxCocoa will create a singleton instance of this class upon startup and register it with the default notification center to
47 listen for several events sent by the NSApplication singleton.
48
49 Because there can be any number of notification observers, this method allows wxCocoa to function properly even when it is
50 running as a plugin of some other (most likely not wxWidgets) application.
51 */
52 @interface wxNSApplicationObserver : NSObject
53 {
54 }
55
56 // Methods defined as (but not used here) as NSApplication delegate methods.
57 - (void)applicationWillBecomeActive:(NSNotification *)notification;
58 - (void)applicationDidBecomeActive:(NSNotification *)notification;
59 - (void)applicationWillResignActive:(NSNotification *)notification;
60 - (void)applicationDidResignActive:(NSNotification *)notification;
61 - (void)applicationWillUpdate:(NSNotification *)notification;
62
63 // Other notifications
64 - (void)controlTintChanged:(NSNotification *)notification;
65 @end // interface wxNSApplicationObserver : NSObject
66 WX_DECLARE_GET_OBJC_CLASS(wxNSApplicationObserver,NSObject)
67
68 #endif //ndef _WX_COCOA_NSAPPLICATION_H__