1706f2543Smrg/* X11Application.h -- subclass of NSApplication to multiplex events 2706f2543Smrg 3706f2543Smrg Copyright (c) 2002-2007 Apple Inc. All rights reserved. 4706f2543Smrg 5706f2543Smrg Permission is hereby granted, free of charge, to any person 6706f2543Smrg obtaining a copy of this software and associated documentation files 7706f2543Smrg (the "Software"), to deal in the Software without restriction, 8706f2543Smrg including without limitation the rights to use, copy, modify, merge, 9706f2543Smrg publish, distribute, sublicense, and/or sell copies of the Software, 10706f2543Smrg and to permit persons to whom the Software is furnished to do so, 11706f2543Smrg subject to the following conditions: 12706f2543Smrg 13706f2543Smrg The above copyright notice and this permission notice shall be 14706f2543Smrg included in all copies or substantial portions of the Software. 15706f2543Smrg 16706f2543Smrg THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17706f2543Smrg EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18706f2543Smrg MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19706f2543Smrg NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT 20706f2543Smrg HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21706f2543Smrg WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22706f2543Smrg OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23706f2543Smrg DEALINGS IN THE SOFTWARE. 24706f2543Smrg 25706f2543Smrg Except as contained in this notice, the name(s) of the above 26706f2543Smrg copyright holders shall not be used in advertising or otherwise to 27706f2543Smrg promote the sale, use or other dealings in this Software without 28706f2543Smrg prior written authorization. */ 29706f2543Smrg 30706f2543Smrg#ifndef X11APPLICATION_H 31706f2543Smrg#define X11APPLICATION_H 1 32706f2543Smrg 33706f2543Smrg#if __OBJC__ 34706f2543Smrg 35706f2543Smrg#import "X11Controller.h" 36706f2543Smrg 37706f2543Smrg@interface X11Application : NSApplication { 38706f2543Smrg X11Controller *_controller; 39706f2543Smrg 40706f2543Smrg unsigned int _x_active :1; 41706f2543Smrg} 42706f2543Smrg 43706f2543Smrg- (void) set_controller:controller; 44706f2543Smrg- (void) set_window_menu:(NSArray *)list; 45706f2543Smrg 46706f2543Smrg- (int) prefs_get_integer:(NSString *)key default:(int)def; 47706f2543Smrg- (const char *) prefs_get_string:(NSString *)key default:(const char *)def; 48706f2543Smrg- (float) prefs_get_float:(NSString *)key default:(float)def; 49706f2543Smrg- (int) prefs_get_boolean:(NSString *)key default:(int)def; 50706f2543Smrg- (NSURL *) prefs_copy_url:(NSString *)key default:(NSURL *)def; 51706f2543Smrg- (NSArray *) prefs_get_array:(NSString *)key; 52706f2543Smrg- (void) prefs_set_integer:(NSString *)key value:(int)value; 53706f2543Smrg- (void) prefs_set_float:(NSString *)key value:(float)value; 54706f2543Smrg- (void) prefs_set_boolean:(NSString *)key value:(int)value; 55706f2543Smrg- (void) prefs_set_array:(NSString *)key value:(NSArray *)value; 56706f2543Smrg- (void) prefs_set_string:(NSString *)key value:(NSString *)value; 57706f2543Smrg- (void) prefs_synchronize; 58706f2543Smrg 59706f2543Smrg- (X11Controller *) controller; 60706f2543Smrg- (OSX_BOOL) x_active; 61706f2543Smrg@end 62706f2543Smrg 63706f2543Smrgextern X11Application *X11App; 64706f2543Smrg 65706f2543Smrg#endif /* __OBJC__ */ 66706f2543Smrg 67706f2543Smrgvoid X11ApplicationSetWindowMenu (int nitems, const char **items, 68706f2543Smrg const char *shortcuts); 69706f2543Smrgvoid X11ApplicationSetWindowMenuCheck (int idx); 70706f2543Smrgvoid X11ApplicationSetFrontProcess (void); 71706f2543Smrgvoid X11ApplicationSetCanQuit (int state); 72706f2543Smrgvoid X11ApplicationServerReady (void); 73706f2543Smrgvoid X11ApplicationShowHideMenubar (int state); 74706f2543Smrgvoid X11ApplicationLaunchClient (const char *cmd); 75706f2543Smrg 76706f2543SmrgBool X11ApplicationCanEnterRandR (void); 77706f2543Smrg 78706f2543Smrgvoid X11ApplicationMain(int argc, char **argv, char **envp); 79706f2543Smrg 80706f2543Smrg#define PREFS_APPSMENU "apps_menu" 81706f2543Smrg#define PREFS_FAKEBUTTONS "enable_fake_buttons" 82706f2543Smrg#define PREFS_KEYEQUIVS "enable_key_equivalents" 83706f2543Smrg#define PREFS_FULLSCREEN_HOTKEYS "fullscreen_hotkeys" 84706f2543Smrg#define PREFS_FULLSCREEN_MENU "fullscreen_menu" 85706f2543Smrg#define PREFS_SYNC_KEYMAP "sync_keymap" 86706f2543Smrg#define PREFS_DEPTH "depth" 87706f2543Smrg#define PREFS_NO_AUTH "no_auth" 88706f2543Smrg#define PREFS_NO_TCP "nolisten_tcp" 89706f2543Smrg#define PREFS_DONE_XINIT_CHECK "done_xinit_check" 90706f2543Smrg#define PREFS_NO_QUIT_ALERT "no_quit_alert" 91706f2543Smrg#define PREFS_NO_RANDR_ALERT "no_randr_alert" 92706f2543Smrg#define PREFS_OPTION_SENDS_ALT "option_sends_alt" 93706f2543Smrg#define PREFS_FAKE_BUTTON2 "fake_button2" 94706f2543Smrg#define PREFS_FAKE_BUTTON3 "fake_button3" 95706f2543Smrg#define PREFS_APPKIT_MODIFIERS "appkit_modifiers" 96706f2543Smrg#define PREFS_WINDOW_ITEM_MODIFIERS "window_item_modifiers" 97706f2543Smrg#define PREFS_ROOTLESS "rootless" 98706f2543Smrg#define PREFS_TEST_EXTENSIONS "enable_test_extensions" 99706f2543Smrg#define PREFS_XP_OPTIONS "xp_options" 100706f2543Smrg#define PREFS_LOGIN_SHELL "login_shell" 101706f2543Smrg#define PREFS_UPDATE_FEED "update_feed" 102706f2543Smrg#define PREFS_CLICK_THROUGH "wm_click_through" 103706f2543Smrg#define PREFS_FFM "wm_ffm" 104706f2543Smrg#define PREFS_FOCUS_ON_NEW_WINDOW "wm_focus_on_new_window" 105706f2543Smrg 106706f2543Smrg#define PREFS_SCROLL_IN_DEV_DIRECTION "scroll_in_device_direction" 107706f2543Smrgextern Bool XQuartzScrollInDeviceDirection; 108706f2543Smrg 109706f2543Smrg#define PREFS_SYNC_PB "sync_pasteboard" 110706f2543Smrg#define PREFS_SYNC_PB_TO_CLIPBOARD "sync_pasteboard_to_clipboard" 111706f2543Smrg#define PREFS_SYNC_PB_TO_PRIMARY "sync_pasteboard_to_primary" 112706f2543Smrg#define PREFS_SYNC_CLIPBOARD_TO_PB "sync_clipboard_to_pasteboard" 113706f2543Smrg#define PREFS_SYNC_PRIMARY_ON_SELECT "sync_primary_on_select" 114706f2543Smrg 115706f2543Smrg#endif /* X11APPLICATION_H */ 116