Remove ancient trunk folder from svn repository
[synfig.git] / synfig-osx / launcher / X11Application.h
1 /* X11Application.h -- subclass of NSApplication to multiplex events
2    $Id: X11Application.h,v 1.26 2003/08/08 19:16:13 jharper Exp $
3
4    Copyright (c) 2002 Apple Computer, Inc. All rights reserved.
5
6    Permission is hereby granted, free of charge, to any person
7    obtaining a copy of this software and associated documentation files
8    (the "Software"), to deal in the Software without restriction,
9    including without limitation the rights to use, copy, modify, merge,
10    publish, distribute, sublicense, and/or sell copies of the Software,
11    and to permit persons to whom the Software is furnished to do so,
12    subject to the following conditions:
13
14    The above copyright notice and this permission notice shall be
15    included in all copies or substantial portions of the Software.
16
17    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20    NONINFRINGEMENT.  IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
21    HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
24    DEALINGS IN THE SOFTWARE.
25
26    Except as contained in this notice, the name(s) of the above
27    copyright holders shall not be used in advertising or otherwise to
28    promote the sale, use or other dealings in this Software without
29    prior written authorization. */
30
31 #ifndef X11APPLICATION_H
32 #define X11APPLICATION_H 1
33
34 #if __OBJC__
35
36 #import <Cocoa/Cocoa.h>
37 #import "X11Controller.h"
38
39 @interface X11Application : NSApplication {
40     X11Controller *_controller;
41
42     unsigned int _x_active :1;
43 }
44
45 - (void) set_controller:controller;
46 - (void) set_window_menu:(NSArray *)list;
47
48 - (int) prefs_get_integer:(NSString *)key default:(int)def;
49 - (const char *) prefs_get_string:(NSString *)key default:(const char *)def;
50 - (float) prefs_get_float:(NSString *)key default:(float)def;
51 - (int) prefs_get_boolean:(NSString *)key default:(int)def;
52 - (NSArray *) prefs_get_array:(NSString *)key;
53 - (void) prefs_set_integer:(NSString *)key value:(int)value;
54 - (void) prefs_set_float:(NSString *)key value:(float)value;
55 - (void) prefs_set_boolean:(NSString *)key value:(int)value;
56 - (void) prefs_set_array:(NSString *)key value:(NSArray *)value;
57 - (void) prefs_set_string:(NSString *)key value:(NSString *)value;
58 - (void) prefs_synchronize;
59
60 - (BOOL) x_active;
61
62 @end
63
64 extern X11Application *X11App;
65
66 #endif /* __OBJC__ */
67
68 extern void X11ApplicationSetWindowMenu (int nitems, const char **items,
69                                          const char *shortcuts);
70 extern void X11ApplicationSetWindowMenuCheck (int idx);
71 extern void X11ApplicationSetFrontProcess (void);
72 extern void X11ApplicationSetCanQuit (int state);
73 extern void X11ApplicationServerReady (void);
74 extern void X11ApplicationShowHideMenubar (int state);
75
76 extern void X11ApplicationMain (int argc, const char *argv[],
77                                 void (*server_thread) (void *),
78                                 void *server_arg);
79
80 extern int X11EnableKeyEquivalents;
81
82 #define APP_PREFS "com.apple.x11"
83
84 #define PREFS_APPSMENU          "apps_menu"
85 #define PREFS_FAKEBUTTONS       "enable_fake_buttons"
86 #define PREFS_SYSBEEP           "enable_system_beep"
87 #define PREFS_KEYEQUIVS         "enable_key_equivalents"
88 #define PREFS_KEYMAP_FILE       "keymap_file"
89 #define PREFS_SYNC_KEYMAP       "sync_keymap"
90 #define PREFS_DEPTH             "depth"
91 #define PREFS_NO_AUTH           "no_auth"
92 #define PREFS_NO_TCP            "nolisten_tcp"
93 #define PREFS_DONE_XINIT_CHECK  "done_xinit_check"
94 #define PREFS_NO_QUIT_ALERT     "no_quit_alert"
95 #define PREFS_FAKE_BUTTON2      "fake_button2"
96 #define PREFS_FAKE_BUTTON3      "fake_button3"
97 #define PREFS_ROOTLESS          "rootless"
98 #define PREFS_FULLSCREEN_HOTKEYS "fullscreen_hotkeys"
99 #define PREFS_SWAP_ALT_META     "swap_alt_meta"
100 #define PREFS_XP_OPTIONS        "xp_options"
101
102 #endif /* X11APPLICATION_H */