2007-02-27 02:06:53 +01:00
|
|
|
/* X11Application.h -- subclass of NSApplication to multiplex events
|
|
|
|
|
|
|
|
Copyright (c) 2002-2007 Apple Inc. All rights reserved.
|
|
|
|
|
|
|
|
Permission is hereby granted, free of charge, to any person
|
|
|
|
obtaining a copy of this software and associated documentation files
|
|
|
|
(the "Software"), to deal in the Software without restriction,
|
|
|
|
including without limitation the rights to use, copy, modify, merge,
|
|
|
|
publish, distribute, sublicense, and/or sell copies of the Software,
|
|
|
|
and to permit persons to whom the Software is furnished to do so,
|
|
|
|
subject to the following conditions:
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be
|
|
|
|
included in all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
|
NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
|
|
|
|
HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
|
|
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
|
DEALINGS IN THE SOFTWARE.
|
|
|
|
|
|
|
|
Except as contained in this notice, the name(s) of the above
|
|
|
|
copyright holders shall not be used in advertising or otherwise to
|
|
|
|
promote the sale, use or other dealings in this Software without
|
|
|
|
prior written authorization. */
|
|
|
|
|
|
|
|
#ifndef X11APPLICATION_H
|
|
|
|
#define X11APPLICATION_H 1
|
|
|
|
|
|
|
|
#if __OBJC__
|
2008-04-19 05:25:38 +02:00
|
|
|
|
2007-02-27 02:06:53 +01:00
|
|
|
#import "X11Controller.h"
|
|
|
|
|
|
|
|
@interface X11Application : NSApplication {
|
|
|
|
X11Controller *_controller;
|
|
|
|
|
|
|
|
unsigned int _x_active :1;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void) set_controller:controller;
|
|
|
|
- (void) set_window_menu:(NSArray *)list;
|
|
|
|
|
|
|
|
- (int) prefs_get_integer:(NSString *)key default:(int)def;
|
|
|
|
- (const char *) prefs_get_string:(NSString *)key default:(const char *)def;
|
|
|
|
- (float) prefs_get_float:(NSString *)key default:(float)def;
|
|
|
|
- (int) prefs_get_boolean:(NSString *)key default:(int)def;
|
2009-07-19 00:51:29 +02:00
|
|
|
- (NSURL *) prefs_copy_url:(NSString *)key default:(NSURL *)def;
|
2007-02-27 02:06:53 +01:00
|
|
|
- (NSArray *) prefs_get_array:(NSString *)key;
|
|
|
|
- (void) prefs_set_integer:(NSString *)key value:(int)value;
|
|
|
|
- (void) prefs_set_float:(NSString *)key value:(float)value;
|
|
|
|
- (void) prefs_set_boolean:(NSString *)key value:(int)value;
|
|
|
|
- (void) prefs_set_array:(NSString *)key value:(NSArray *)value;
|
|
|
|
- (void) prefs_set_string:(NSString *)key value:(NSString *)value;
|
|
|
|
- (void) prefs_synchronize;
|
|
|
|
|
2008-04-19 05:25:38 +02:00
|
|
|
- (OSX_BOOL) x_active;
|
2007-02-27 02:06:53 +01:00
|
|
|
@end
|
|
|
|
|
|
|
|
extern X11Application *X11App;
|
|
|
|
|
|
|
|
#endif /* __OBJC__ */
|
|
|
|
|
2007-12-20 22:17:30 +01:00
|
|
|
void X11ApplicationSetWindowMenu (int nitems, const char **items,
|
2007-02-27 02:06:53 +01:00
|
|
|
const char *shortcuts);
|
2007-12-20 22:17:30 +01:00
|
|
|
void X11ApplicationSetWindowMenuCheck (int idx);
|
|
|
|
void X11ApplicationSetFrontProcess (void);
|
|
|
|
void X11ApplicationSetCanQuit (int state);
|
|
|
|
void X11ApplicationServerReady (void);
|
|
|
|
void X11ApplicationShowHideMenubar (int state);
|
2007-02-27 02:06:53 +01:00
|
|
|
|
2008-04-28 20:47:49 +02:00
|
|
|
void X11ApplicationMain(int argc, char **argv, char **envp);
|
2007-02-27 02:06:53 +01:00
|
|
|
|
|
|
|
extern int X11EnableKeyEquivalents;
|
2008-11-01 04:03:34 +01:00
|
|
|
extern int quartzHasRoot, quartzEnableRootless, quartzFullscreenMenu;
|
2007-02-27 02:06:53 +01:00
|
|
|
|
2007-12-20 22:17:30 +01:00
|
|
|
#define PREFS_APPSMENU "apps_menu"
|
|
|
|
#define PREFS_FAKEBUTTONS "enable_fake_buttons"
|
|
|
|
#define PREFS_SYSBEEP "enable_system_beep"
|
|
|
|
#define PREFS_KEYEQUIVS "enable_key_equivalents"
|
2008-10-09 03:39:41 +02:00
|
|
|
#define PREFS_FULLSCREEN_HOTKEYS "fullscreen_hotkeys"
|
2008-11-01 04:03:34 +01:00
|
|
|
#define PREFS_FULLSCREEN_MENU "fullscreen_menu"
|
2007-12-20 22:17:30 +01:00
|
|
|
#define PREFS_SYNC_KEYMAP "sync_keymap"
|
|
|
|
#define PREFS_DEPTH "depth"
|
|
|
|
#define PREFS_NO_AUTH "no_auth"
|
|
|
|
#define PREFS_NO_TCP "nolisten_tcp"
|
|
|
|
#define PREFS_DONE_XINIT_CHECK "done_xinit_check"
|
|
|
|
#define PREFS_NO_QUIT_ALERT "no_quit_alert"
|
|
|
|
#define PREFS_FAKE_BUTTON2 "fake_button2"
|
|
|
|
#define PREFS_FAKE_BUTTON3 "fake_button3"
|
2008-08-19 11:02:11 +02:00
|
|
|
#define PREFS_APPKIT_MODIFIERS "appkit_modifiers"
|
2008-08-20 18:21:44 +02:00
|
|
|
#define PREFS_WINDOW_ITEM_MODIFIERS "window_item_modifiers"
|
2007-12-20 22:17:30 +01:00
|
|
|
#define PREFS_ROOTLESS "rootless"
|
2008-11-28 21:59:09 +01:00
|
|
|
#define PREFS_TEST_EXTENSIONS "enable_test_extensions"
|
2007-12-20 22:17:30 +01:00
|
|
|
#define PREFS_XP_OPTIONS "xp_options"
|
2008-01-12 20:35:48 +01:00
|
|
|
#define PREFS_LOGIN_SHELL "login_shell"
|
2009-07-19 00:51:29 +02:00
|
|
|
#define PREFS_UPDATE_FEED "update_feed"
|
2008-03-22 03:11:59 +01:00
|
|
|
#define PREFS_CLICK_THROUGH "wm_click_through"
|
|
|
|
#define PREFS_FFM "wm_ffm"
|
|
|
|
#define PREFS_FOCUS_ON_NEW_WINDOW "wm_focus_on_new_window"
|
2007-02-27 02:06:53 +01:00
|
|
|
|
2008-09-22 02:40:35 +02:00
|
|
|
#define PREFS_SYNC_PB "sync_pasteboard"
|
|
|
|
#define PREFS_SYNC_PB_TO_CLIPBOARD "sync_pasteboard_to_clipboard"
|
|
|
|
#define PREFS_SYNC_PB_TO_PRIMARY "sync_pasteboard_to_primary"
|
|
|
|
#define PREFS_SYNC_CLIPBOARD_TO_PB "sync_clipboard_to_pasteboard"
|
|
|
|
#define PREFS_SYNC_PRIMARY_ON_SELECT "sync_primary_on_select"
|
|
|
|
|
2007-02-27 02:06:53 +01:00
|
|
|
#endif /* X11APPLICATION_H */
|