X11Application.h revision 35c4bbdf
14642e01fSmrg/* X11Application.h -- subclass of NSApplication to multiplex events 235c4bbdfSmrg * 335c4bbdfSmrg * Copyright (c) 2002-2012 Apple Inc. All rights reserved. 435c4bbdfSmrg * 535c4bbdfSmrg * Permission is hereby granted, free of charge, to any person 635c4bbdfSmrg * obtaining a copy of this software and associated documentation files 735c4bbdfSmrg * (the "Software"), to deal in the Software without restriction, 835c4bbdfSmrg * including without limitation the rights to use, copy, modify, merge, 935c4bbdfSmrg * publish, distribute, sublicense, and/or sell copies of the Software, 1035c4bbdfSmrg * and to permit persons to whom the Software is furnished to do so, 1135c4bbdfSmrg * subject to the following conditions: 1235c4bbdfSmrg * 1335c4bbdfSmrg * The above copyright notice and this permission notice shall be 1435c4bbdfSmrg * included in all copies or substantial portions of the Software. 1535c4bbdfSmrg * 1635c4bbdfSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 1735c4bbdfSmrg * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1835c4bbdfSmrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 1935c4bbdfSmrg * NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT 2035c4bbdfSmrg * HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 2135c4bbdfSmrg * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 2235c4bbdfSmrg * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 2335c4bbdfSmrg * DEALINGS IN THE SOFTWARE. 2435c4bbdfSmrg * 2535c4bbdfSmrg * Except as contained in this notice, the name(s) of the above 2635c4bbdfSmrg * copyright holders shall not be used in advertising or otherwise to 2735c4bbdfSmrg * promote the sale, use or other dealings in this Software without 2835c4bbdfSmrg * prior written authorization. 2935c4bbdfSmrg */ 304642e01fSmrg 314642e01fSmrg#ifndef X11APPLICATION_H 324642e01fSmrg#define X11APPLICATION_H 1 334642e01fSmrg 344642e01fSmrg#if __OBJC__ 354642e01fSmrg 364642e01fSmrg#import "X11Controller.h" 374642e01fSmrg 384642e01fSmrg@interface X11Application : NSApplication { 394642e01fSmrg X11Controller *_controller; 404642e01fSmrg 4135c4bbdfSmrg unsigned int _x_active : 1; 424642e01fSmrg} 434642e01fSmrg 4435c4bbdfSmrg- (void)set_controller:controller; 4535c4bbdfSmrg- (void)set_window_menu:(NSArray *)list; 4635c4bbdfSmrg 4735c4bbdfSmrg- (CFPropertyListRef)prefs_get_copy:(NSString *)key CF_RETURNS_RETAINED; 4835c4bbdfSmrg- (int)prefs_get_integer:(NSString *)key default:(int)def; 4935c4bbdfSmrg- (const char *)prefs_get_string:(NSString *)key default:(const char *)def; 5035c4bbdfSmrg- (float)prefs_get_float:(NSString *)key default:(float)def; 5135c4bbdfSmrg- (int)prefs_get_boolean:(NSString *)key default:(int)def; 5235c4bbdfSmrg- (NSURL *)prefs_copy_url:(NSString *)key default:(NSURL *)def 5335c4bbdfSmrg NS_RETURNS_RETAINED; 5435c4bbdfSmrg- (NSArray *)prefs_get_array:(NSString *)key; 5535c4bbdfSmrg- (void)prefs_set_integer:(NSString *)key value:(int)value; 5635c4bbdfSmrg- (void)prefs_set_float:(NSString *)key value:(float)value; 5735c4bbdfSmrg- (void)prefs_set_boolean:(NSString *)key value:(int)value; 5835c4bbdfSmrg- (void)prefs_set_array:(NSString *)key value:(NSArray *)value; 5935c4bbdfSmrg- (void)prefs_set_string:(NSString *)key value:(NSString *)value; 6035c4bbdfSmrg- (void)prefs_synchronize; 6135c4bbdfSmrg 6235c4bbdfSmrg- (X11Controller *)controller; 6335c4bbdfSmrg- (OSX_BOOL)x_active; 644642e01fSmrg@end 654642e01fSmrg 6635c4bbdfSmrgextern X11Application * X11App; 674642e01fSmrg 684642e01fSmrg#endif /* __OBJC__ */ 694642e01fSmrg 7035c4bbdfSmrgvoid 7135c4bbdfSmrgX11ApplicationSetWindowMenu(int nitems, const char **items, 7235c4bbdfSmrg const char *shortcuts); 7335c4bbdfSmrgvoid 7435c4bbdfSmrgX11ApplicationSetWindowMenuCheck(int idx); 7535c4bbdfSmrgvoid 7635c4bbdfSmrgX11ApplicationSetFrontProcess(void); 7735c4bbdfSmrgvoid 7835c4bbdfSmrgX11ApplicationSetCanQuit(int state); 7935c4bbdfSmrgvoid 8035c4bbdfSmrgX11ApplicationServerReady(void); 8135c4bbdfSmrgvoid 8235c4bbdfSmrgX11ApplicationShowHideMenubar(int state); 8335c4bbdfSmrgvoid 8435c4bbdfSmrgX11ApplicationLaunchClient(const char *cmd); 8535c4bbdfSmrg 8635c4bbdfSmrgBool 8735c4bbdfSmrgX11ApplicationCanEnterRandR(void); 8835c4bbdfSmrg 8935c4bbdfSmrgvoid 9035c4bbdfSmrgX11ApplicationFatalError(const char *f, va_list args) __printflike(1, 0); 9135c4bbdfSmrg 9235c4bbdfSmrgvoid 9335c4bbdfSmrgX11ApplicationMain(int argc, char **argv, char **envp); 9435c4bbdfSmrg 9535c4bbdfSmrg#define PREFS_APPSMENU "apps_menu" 9635c4bbdfSmrg#define PREFS_FAKEBUTTONS "enable_fake_buttons" 9735c4bbdfSmrg#define PREFS_KEYEQUIVS "enable_key_equivalents" 9835c4bbdfSmrg#define PREFS_FULLSCREEN_HOTKEYS "fullscreen_hotkeys" 9935c4bbdfSmrg#define PREFS_FULLSCREEN_MENU "fullscreen_menu" 10035c4bbdfSmrg#define PREFS_SYNC_KEYMAP "sync_keymap" 10135c4bbdfSmrg#define PREFS_DEPTH "depth" 10235c4bbdfSmrg#define PREFS_NO_AUTH "no_auth" 10335c4bbdfSmrg#define PREFS_NO_TCP "nolisten_tcp" 10435c4bbdfSmrg#define PREFS_DONE_XINIT_CHECK "done_xinit_check" 10535c4bbdfSmrg#define PREFS_NO_QUIT_ALERT "no_quit_alert" 10635c4bbdfSmrg#define PREFS_NO_RANDR_ALERT "no_randr_alert" 10735c4bbdfSmrg#define PREFS_OPTION_SENDS_ALT "option_sends_alt" 10835c4bbdfSmrg#define PREFS_FAKE_BUTTON2 "fake_button2" 10935c4bbdfSmrg#define PREFS_FAKE_BUTTON3 "fake_button3" 11035c4bbdfSmrg#define PREFS_APPKIT_MODIFIERS "appkit_modifiers" 11135c4bbdfSmrg#define PREFS_WINDOW_ITEM_MODIFIERS "window_item_modifiers" 11235c4bbdfSmrg#define PREFS_ROOTLESS "rootless" 11335c4bbdfSmrg#define PREFS_RENDER_EXTENSION "enable_render_extension" 11435c4bbdfSmrg#define PREFS_TEST_EXTENSIONS "enable_test_extensions" 11535c4bbdfSmrg#define PREFS_XP_OPTIONS "xp_options" 11635c4bbdfSmrg#define PREFS_LOGIN_SHELL "login_shell" 11735c4bbdfSmrg#define PREFS_UPDATE_FEED "update_feed" 11835c4bbdfSmrg#define PREFS_CLICK_THROUGH "wm_click_through" 11935c4bbdfSmrg#define PREFS_FFM "wm_ffm" 12035c4bbdfSmrg#define PREFS_FOCUS_ON_NEW_WINDOW "wm_focus_on_new_window" 1214642e01fSmrg 122475c125cSmrg#define PREFS_SCROLL_IN_DEV_DIRECTION "scroll_in_device_direction" 123475c125cSmrgextern Bool XQuartzScrollInDeviceDirection; 124475c125cSmrg 1254642e01fSmrg#define PREFS_SYNC_PB "sync_pasteboard" 1264642e01fSmrg#define PREFS_SYNC_PB_TO_CLIPBOARD "sync_pasteboard_to_clipboard" 1274642e01fSmrg#define PREFS_SYNC_PB_TO_PRIMARY "sync_pasteboard_to_primary" 1284642e01fSmrg#define PREFS_SYNC_CLIPBOARD_TO_PB "sync_clipboard_to_pasteboard" 1294642e01fSmrg#define PREFS_SYNC_PRIMARY_ON_SELECT "sync_primary_on_select" 1304642e01fSmrg 1314642e01fSmrg#endif /* X11APPLICATION_H */ 132