X11Controller.h revision 35c4bbdf
14642e01fSmrg/* X11Controller.h -- connect the IB ui 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 X11CONTROLLER_H 324642e01fSmrg#define X11CONTROLLER_H 1 334642e01fSmrg 346747b715Smrg#ifdef HAVE_DIX_CONFIG_H 356747b715Smrg#include <dix-config.h> 366747b715Smrg#endif 376747b715Smrg 384642e01fSmrg#if __OBJC__ 394642e01fSmrg 404642e01fSmrg#include "sanitizedCocoa.h" 414642e01fSmrg#include "xpr/x-list.h" 424642e01fSmrg 436747b715Smrg#ifdef XQUARTZ_SPARKLE 446747b715Smrg#define BOOL OSX_BOOL 456747b715Smrg#include <Sparkle/SUUpdater.h> 466747b715Smrg#undef BOOL 476747b715Smrg#endif 486747b715Smrg 496747b715Smrg#ifndef NSINTEGER_DEFINED 506747b715Smrg#if __LP64__ || NS_BUILD_32_LIKE_64 516747b715Smrgtypedef long NSInteger; 526747b715Smrgtypedef unsigned long NSUInteger; 536747b715Smrg#else 546747b715Smrgtypedef int NSInteger; 556747b715Smrgtypedef unsigned int NSUInteger; 566747b715Smrg#endif 576747b715Smrg#endif 586747b715Smrg 594642e01fSmrg@interface X11Controller : NSObject 606747b715Smrg#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 6135c4bbdfSmrg <NSTableViewDataSource> 626747b715Smrg#endif 634642e01fSmrg{ 644642e01fSmrg IBOutlet NSPanel *prefs_panel; 654642e01fSmrg 664642e01fSmrg IBOutlet NSButton *fake_buttons; 674642e01fSmrg IBOutlet NSButton *enable_fullscreen; 684642e01fSmrg IBOutlet NSButton *enable_fullscreen_menu; 69475c125cSmrg IBOutlet NSTextField *enable_fullscreen_menu_text; 704642e01fSmrg IBOutlet NSButton *enable_keyequivs; 714642e01fSmrg IBOutlet NSButton *sync_keymap; 726747b715Smrg IBOutlet NSButton *option_sends_alt; 73475c125cSmrg IBOutlet NSButton *scroll_in_device_direction; 744642e01fSmrg IBOutlet NSButton *click_through; 754642e01fSmrg IBOutlet NSButton *focus_follows_mouse; 764642e01fSmrg IBOutlet NSButton *focus_on_new_window; 774642e01fSmrg IBOutlet NSButton *enable_auth; 784642e01fSmrg IBOutlet NSButton *enable_tcp; 794642e01fSmrg IBOutlet NSButton *sync_pasteboard; 804642e01fSmrg IBOutlet NSButton *sync_pasteboard_to_clipboard; 814642e01fSmrg IBOutlet NSButton *sync_pasteboard_to_primary; 824642e01fSmrg IBOutlet NSButton *sync_clipboard_to_pasteboard; 834642e01fSmrg IBOutlet NSButton *sync_primary_immediately; 844642e01fSmrg IBOutlet NSTextField *sync_text1; 854642e01fSmrg IBOutlet NSTextField *sync_text2; 864642e01fSmrg IBOutlet NSPopUpButton *depth; 874642e01fSmrg 884642e01fSmrg IBOutlet NSMenuItem *window_separator; 896747b715Smrg // window_separator is DEPRECATED due to this radar: 906747b715Smrg // <rdar://problem/7088335> NSApplication releases the separator in the Windows menu even though it's an IBOutlet 916747b715Smrg // It is kept around for localization compatability and is subject to removal "eventually" 926747b715Smrg // If it is !NULL (meaning it is in the nib), it is removed from the menu and released 936747b715Smrg 946747b715Smrg IBOutlet NSMenuItem *x11_about_item; 954642e01fSmrg IBOutlet NSMenuItem *dock_window_separator; 964642e01fSmrg IBOutlet NSMenuItem *apps_separator; 974642e01fSmrg IBOutlet NSMenuItem *toggle_fullscreen_item; 986747b715Smrg#ifdef XQUARTZ_SPARKLE 996747b715Smrg NSMenuItem *check_for_updates_item; // Programatically enabled 1006747b715Smrg#endif 1014642e01fSmrg IBOutlet NSMenuItem *copy_menu_item; 1024642e01fSmrg IBOutlet NSMenu *dock_apps_menu; 1034642e01fSmrg IBOutlet NSTableView *apps_table; 1044642e01fSmrg 1054642e01fSmrg NSArray *apps; 1064642e01fSmrg NSMutableArray *table_apps; 1074642e01fSmrg 1084642e01fSmrg IBOutlet NSMenu *dock_menu; 10935c4bbdfSmrg 1106747b715Smrg // This is where in the Windows menu we'll start (this will be the index of the separator) 1116747b715Smrg NSInteger windows_menu_start; 1124642e01fSmrg 1134642e01fSmrg int checked_window_item; 1144642e01fSmrg x_list *pending_apps; 1154642e01fSmrg 1164642e01fSmrg OSX_BOOL finished_launching; 1174642e01fSmrg OSX_BOOL can_quit; 1184642e01fSmrg} 1194642e01fSmrg 12035c4bbdfSmrg- (void)set_window_menu:(NSArray *)list; 12135c4bbdfSmrg- (void)set_window_menu_check:(NSNumber *)n; 12235c4bbdfSmrg- (void)set_apps_menu:(NSArray *)list; 1236747b715Smrg#ifdef XQUARTZ_SPARKLE 12435c4bbdfSmrg- (void)setup_sparkle; 12535c4bbdfSmrg- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *) 12635c4bbdfSmrg update; 1276747b715Smrg#endif 12835c4bbdfSmrg- (void)set_can_quit:(OSX_BOOL)state; 12935c4bbdfSmrg- (void)server_ready; 13035c4bbdfSmrg- (OSX_BOOL)application:(NSApplication *)app openFile:(NSString *)filename; 13135c4bbdfSmrg 13235c4bbdfSmrg- (IBAction)apps_table_show:(id)sender; 13335c4bbdfSmrg- (IBAction)apps_table_done:(id)sender; 13435c4bbdfSmrg- (IBAction)apps_table_new:(id)sender; 13535c4bbdfSmrg- (IBAction)apps_table_duplicate:(id)sender; 13635c4bbdfSmrg- (IBAction)apps_table_delete:(id)sender; 13735c4bbdfSmrg- (IBAction)bring_to_front:(id)sender; 13835c4bbdfSmrg- (IBAction)close_window:(id)sender; 13935c4bbdfSmrg- (IBAction)minimize_window:(id)sender; 14035c4bbdfSmrg- (IBAction)zoom_window:(id)sender; 14135c4bbdfSmrg- (IBAction)next_window:(id)sender; 14235c4bbdfSmrg- (IBAction)previous_window:(id)sender; 14335c4bbdfSmrg- (IBAction)enable_fullscreen_changed:(id)sender; 14435c4bbdfSmrg- (IBAction)toggle_fullscreen:(id)sender; 14535c4bbdfSmrg- (IBAction)prefs_changed:(id)sender; 14635c4bbdfSmrg- (IBAction)prefs_show:(id)sender; 14735c4bbdfSmrg- (IBAction)quit:(id)sender; 14835c4bbdfSmrg- (IBAction)x11_help:(id)sender; 1494642e01fSmrg 1504642e01fSmrg@end 1514642e01fSmrg 1524642e01fSmrg#endif /* __OBJC__ */ 1534642e01fSmrg 15435c4bbdfSmrgvoid 15535c4bbdfSmrgX11ControllerMain(int argc, char **argv, char **envp); 1564642e01fSmrg 1574642e01fSmrg#endif /* X11CONTROLLER_H */ 158