X11Application.h revision 4642e01f
14642e01fSmrg/* X11Application.h -- subclass of NSApplication to multiplex events 24642e01fSmrg 34642e01fSmrg Copyright (c) 2002-2007 Apple Inc. All rights reserved. 44642e01fSmrg 54642e01fSmrg Permission is hereby granted, free of charge, to any person 64642e01fSmrg obtaining a copy of this software and associated documentation files 74642e01fSmrg (the "Software"), to deal in the Software without restriction, 84642e01fSmrg including without limitation the rights to use, copy, modify, merge, 94642e01fSmrg publish, distribute, sublicense, and/or sell copies of the Software, 104642e01fSmrg and to permit persons to whom the Software is furnished to do so, 114642e01fSmrg subject to the following conditions: 124642e01fSmrg 134642e01fSmrg The above copyright notice and this permission notice shall be 144642e01fSmrg included in all copies or substantial portions of the Software. 154642e01fSmrg 164642e01fSmrg THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 174642e01fSmrg EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 184642e01fSmrg MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 194642e01fSmrg NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT 204642e01fSmrg HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 214642e01fSmrg WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 224642e01fSmrg OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 234642e01fSmrg DEALINGS IN THE SOFTWARE. 244642e01fSmrg 254642e01fSmrg Except as contained in this notice, the name(s) of the above 264642e01fSmrg copyright holders shall not be used in advertising or otherwise to 274642e01fSmrg promote the sale, use or other dealings in this Software without 284642e01fSmrg prior written authorization. */ 294642e01fSmrg 304642e01fSmrg#ifndef X11APPLICATION_H 314642e01fSmrg#define X11APPLICATION_H 1 324642e01fSmrg 334642e01fSmrg#if __OBJC__ 344642e01fSmrg 354642e01fSmrg#import "X11Controller.h" 364642e01fSmrg 374642e01fSmrg@interface X11Application : NSApplication { 384642e01fSmrg X11Controller *_controller; 394642e01fSmrg 404642e01fSmrg unsigned int _x_active :1; 414642e01fSmrg} 424642e01fSmrg 434642e01fSmrg- (void) set_controller:controller; 444642e01fSmrg- (void) set_window_menu:(NSArray *)list; 454642e01fSmrg 464642e01fSmrg- (int) prefs_get_integer:(NSString *)key default:(int)def; 474642e01fSmrg- (const char *) prefs_get_string:(NSString *)key default:(const char *)def; 484642e01fSmrg- (float) prefs_get_float:(NSString *)key default:(float)def; 494642e01fSmrg- (int) prefs_get_boolean:(NSString *)key default:(int)def; 504642e01fSmrg- (NSArray *) prefs_get_array:(NSString *)key; 514642e01fSmrg- (void) prefs_set_integer:(NSString *)key value:(int)value; 524642e01fSmrg- (void) prefs_set_float:(NSString *)key value:(float)value; 534642e01fSmrg- (void) prefs_set_boolean:(NSString *)key value:(int)value; 544642e01fSmrg- (void) prefs_set_array:(NSString *)key value:(NSArray *)value; 554642e01fSmrg- (void) prefs_set_string:(NSString *)key value:(NSString *)value; 564642e01fSmrg- (void) prefs_synchronize; 574642e01fSmrg 584642e01fSmrg- (OSX_BOOL) x_active; 594642e01fSmrg@end 604642e01fSmrg 614642e01fSmrgextern X11Application *X11App; 624642e01fSmrg 634642e01fSmrg#endif /* __OBJC__ */ 644642e01fSmrg 654642e01fSmrgvoid X11ApplicationSetWindowMenu (int nitems, const char **items, 664642e01fSmrg const char *shortcuts); 674642e01fSmrgvoid X11ApplicationSetWindowMenuCheck (int idx); 684642e01fSmrgvoid X11ApplicationSetFrontProcess (void); 694642e01fSmrgvoid X11ApplicationSetCanQuit (int state); 704642e01fSmrgvoid X11ApplicationServerReady (void); 714642e01fSmrgvoid X11ApplicationShowHideMenubar (int state); 724642e01fSmrg 734642e01fSmrgvoid X11ApplicationMain(int argc, char **argv, char **envp); 744642e01fSmrg 754642e01fSmrgextern int X11EnableKeyEquivalents; 764642e01fSmrgextern int quartzHasRoot, quartzEnableRootless, quartzFullscreenMenu; 774642e01fSmrg 784642e01fSmrg#define PREFS_APPSMENU "apps_menu" 794642e01fSmrg#define PREFS_FAKEBUTTONS "enable_fake_buttons" 804642e01fSmrg#define PREFS_SYSBEEP "enable_system_beep" 814642e01fSmrg#define PREFS_KEYEQUIVS "enable_key_equivalents" 824642e01fSmrg#define PREFS_FULLSCREEN_HOTKEYS "fullscreen_hotkeys" 834642e01fSmrg#define PREFS_FULLSCREEN_MENU "fullscreen_menu" 844642e01fSmrg#define PREFS_SYNC_KEYMAP "sync_keymap" 854642e01fSmrg#define PREFS_DEPTH "depth" 864642e01fSmrg#define PREFS_NO_AUTH "no_auth" 874642e01fSmrg#define PREFS_NO_TCP "nolisten_tcp" 884642e01fSmrg#define PREFS_DONE_XINIT_CHECK "done_xinit_check" 894642e01fSmrg#define PREFS_NO_QUIT_ALERT "no_quit_alert" 904642e01fSmrg#define PREFS_FAKE_BUTTON2 "fake_button2" 914642e01fSmrg#define PREFS_FAKE_BUTTON3 "fake_button3" 924642e01fSmrg#define PREFS_APPKIT_MODIFIERS "appkit_modifiers" 934642e01fSmrg#define PREFS_WINDOW_ITEM_MODIFIERS "window_item_modifiers" 944642e01fSmrg#define PREFS_ROOTLESS "rootless" 954642e01fSmrg#define PREFS_TEST_EXTENSIONS "enable_test_extensions" 964642e01fSmrg#define PREFS_XP_OPTIONS "xp_options" 974642e01fSmrg#define PREFS_LOGIN_SHELL "login_shell" 984642e01fSmrg#define PREFS_CLICK_THROUGH "wm_click_through" 994642e01fSmrg#define PREFS_FFM "wm_ffm" 1004642e01fSmrg#define PREFS_FOCUS_ON_NEW_WINDOW "wm_focus_on_new_window" 1014642e01fSmrg 1024642e01fSmrg#define PREFS_SYNC_PB "sync_pasteboard" 1034642e01fSmrg#define PREFS_SYNC_PB_TO_CLIPBOARD "sync_pasteboard_to_clipboard" 1044642e01fSmrg#define PREFS_SYNC_PB_TO_PRIMARY "sync_pasteboard_to_primary" 1054642e01fSmrg#define PREFS_SYNC_CLIPBOARD_TO_PB "sync_clipboard_to_pasteboard" 1064642e01fSmrg#define PREFS_SYNC_PRIMARY_ON_SELECT "sync_primary_on_select" 1074642e01fSmrg 1084642e01fSmrg#endif /* X11APPLICATION_H */ 109