1*4882a593Smuzhiyun /* X11Controller.h -- connect the IB ui 2*4882a593Smuzhiyun * 3*4882a593Smuzhiyun * Copyright (c) 2002-2012 Apple Inc. All rights reserved. 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * Permission is hereby granted, free of charge, to any person 6*4882a593Smuzhiyun * obtaining a copy of this software and associated documentation files 7*4882a593Smuzhiyun * (the "Software"), to deal in the Software without restriction, 8*4882a593Smuzhiyun * including without limitation the rights to use, copy, modify, merge, 9*4882a593Smuzhiyun * publish, distribute, sublicense, and/or sell copies of the Software, 10*4882a593Smuzhiyun * and to permit persons to whom the Software is furnished to do so, 11*4882a593Smuzhiyun * subject to the following conditions: 12*4882a593Smuzhiyun * 13*4882a593Smuzhiyun * The above copyright notice and this permission notice shall be 14*4882a593Smuzhiyun * included in all copies or substantial portions of the Software. 15*4882a593Smuzhiyun * 16*4882a593Smuzhiyun * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17*4882a593Smuzhiyun * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18*4882a593Smuzhiyun * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19*4882a593Smuzhiyun * NONINFRINGEMENT. IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT 20*4882a593Smuzhiyun * HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21*4882a593Smuzhiyun * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22*4882a593Smuzhiyun * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23*4882a593Smuzhiyun * DEALINGS IN THE SOFTWARE. 24*4882a593Smuzhiyun * 25*4882a593Smuzhiyun * Except as contained in this notice, the name(s) of the above 26*4882a593Smuzhiyun * copyright holders shall not be used in advertising or otherwise to 27*4882a593Smuzhiyun * promote the sale, use or other dealings in this Software without 28*4882a593Smuzhiyun * prior written authorization. 29*4882a593Smuzhiyun */ 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun #ifndef X11CONTROLLER_H 32*4882a593Smuzhiyun #define X11CONTROLLER_H 1 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun #ifdef HAVE_DIX_CONFIG_H 35*4882a593Smuzhiyun #include <dix-config.h> 36*4882a593Smuzhiyun #endif 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun #if __OBJC__ 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun #include "sanitizedCocoa.h" 41*4882a593Smuzhiyun #include "xpr/x-list.h" 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun #ifdef XQUARTZ_SPARKLE 44*4882a593Smuzhiyun #define BOOL OSX_BOOL 45*4882a593Smuzhiyun #include <Sparkle/SUUpdater.h> 46*4882a593Smuzhiyun #undef BOOL 47*4882a593Smuzhiyun #endif 48*4882a593Smuzhiyun 49*4882a593Smuzhiyun @interface X11Controller : NSObject <NSTableViewDataSource> 50*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSPanel *prefs_panel; 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSButton *fake_buttons; 53*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSButton *enable_fullscreen; 54*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSButton *enable_fullscreen_menu; 55*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSTextField *enable_fullscreen_menu_text; 56*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSButton *enable_keyequivs; 57*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSButton *sync_keymap; 58*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSButton *option_sends_alt; 59*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSButton *scroll_in_device_direction; 60*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSButton *click_through; 61*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSButton *focus_follows_mouse; 62*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSButton *focus_on_new_window; 63*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSButton *enable_auth; 64*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSButton *enable_tcp; 65*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSButton *sync_pasteboard; 66*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSButton *sync_pasteboard_to_clipboard; 67*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSButton *sync_pasteboard_to_primary; 68*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSButton *sync_clipboard_to_pasteboard; 69*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSButton *sync_primary_immediately; 70*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSTextField *sync_text1; 71*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSTextField *sync_text2; 72*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSPopUpButton *depth; 73*4882a593Smuzhiyun 74*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSMenuItem *x11_about_item; 75*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSMenuItem *dock_window_separator; 76*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSMenuItem *apps_separator; 77*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSMenuItem *toggle_fullscreen_item; 78*4882a593Smuzhiyun 79*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSMenuItem *copy_menu_item; 80*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSMenu *dock_apps_menu; 81*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSTableView *apps_table; 82*4882a593Smuzhiyun 83*4882a593Smuzhiyun @property (nonatomic, readwrite, strong) IBOutlet NSMenu *dock_menu; 84*4882a593Smuzhiyun 85*4882a593Smuzhiyun @property (nonatomic, readwrite, assign) OSX_BOOL can_quit; 86*4882a593Smuzhiyun 87*4882a593Smuzhiyun - (void)set_window_menu:(NSArray *)list; 88*4882a593Smuzhiyun - (void)set_window_menu_check:(NSNumber *)n; 89*4882a593Smuzhiyun - (void)set_apps_menu:(NSArray *)list; 90*4882a593Smuzhiyun #ifdef XQUARTZ_SPARKLE 91*4882a593Smuzhiyun - (void)setup_sparkle; 92*4882a593Smuzhiyun - (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *) 93*4882a593Smuzhiyun update; 94*4882a593Smuzhiyun #endif 95*4882a593Smuzhiyun - (void)server_ready; 96*4882a593Smuzhiyun - (OSX_BOOL)application:(NSApplication *)app openFile:(NSString *)filename; 97*4882a593Smuzhiyun 98*4882a593Smuzhiyun - (IBAction)apps_table_show:(id)sender; 99*4882a593Smuzhiyun - (IBAction)apps_table_done:(id)sender; 100*4882a593Smuzhiyun - (IBAction)apps_table_new:(id)sender; 101*4882a593Smuzhiyun - (IBAction)apps_table_duplicate:(id)sender; 102*4882a593Smuzhiyun - (IBAction)apps_table_delete:(id)sender; 103*4882a593Smuzhiyun - (IBAction)bring_to_front:(id)sender; 104*4882a593Smuzhiyun - (IBAction)close_window:(id)sender; 105*4882a593Smuzhiyun - (IBAction)minimize_window:(id)sender; 106*4882a593Smuzhiyun - (IBAction)zoom_window:(id)sender; 107*4882a593Smuzhiyun - (IBAction)next_window:(id)sender; 108*4882a593Smuzhiyun - (IBAction)previous_window:(id)sender; 109*4882a593Smuzhiyun - (IBAction)enable_fullscreen_changed:(id)sender; 110*4882a593Smuzhiyun - (IBAction)toggle_fullscreen:(id)sender; 111*4882a593Smuzhiyun - (IBAction)prefs_changed:(id)sender; 112*4882a593Smuzhiyun - (IBAction)prefs_show:(id)sender; 113*4882a593Smuzhiyun - (IBAction)quit:(id)sender; 114*4882a593Smuzhiyun - (IBAction)x11_help:(id)sender; 115*4882a593Smuzhiyun 116*4882a593Smuzhiyun @end 117*4882a593Smuzhiyun 118*4882a593Smuzhiyun #endif /* __OBJC__ */ 119*4882a593Smuzhiyun 120*4882a593Smuzhiyun void 121*4882a593Smuzhiyun X11ControllerMain(int argc, char **argv, char **envp); 122*4882a593Smuzhiyun 123*4882a593Smuzhiyun #endif /* X11CONTROLLER_H */ 124