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
49c8548ba8Smrg@interface X11Controller : NSObject <NSTableViewDataSource>
50c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSPanel *prefs_panel;
51c8548ba8Smrg
52c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSButton *fake_buttons;
53c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSButton *enable_fullscreen;
54c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSButton *enable_fullscreen_menu;
55c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSTextField *enable_fullscreen_menu_text;
56c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSButton *enable_keyequivs;
57c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSButton *sync_keymap;
58c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSButton *option_sends_alt;
59c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSButton *scroll_in_device_direction;
60c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSButton *click_through;
61c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSButton *focus_follows_mouse;
62c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSButton *focus_on_new_window;
63c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSButton *enable_auth;
64c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSButton *enable_tcp;
65c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSButton *sync_pasteboard;
66c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSButton *sync_pasteboard_to_clipboard;
67c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSButton *sync_pasteboard_to_primary;
68c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSButton *sync_clipboard_to_pasteboard;
69c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSButton *sync_primary_immediately;
70c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSTextField *sync_text1;
71c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSTextField *sync_text2;
72c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSPopUpButton *depth;
73c8548ba8Smrg
74c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSMenuItem *x11_about_item;
75c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSMenuItem *dock_window_separator;
76c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSMenuItem *apps_separator;
77c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSMenuItem *toggle_fullscreen_item;
78c8548ba8Smrg
79c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSMenuItem *copy_menu_item;
80c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSMenu *dock_apps_menu;
81c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSTableView *apps_table;
82c8548ba8Smrg
83c8548ba8Smrg@property (nonatomic, readwrite, strong) IBOutlet NSMenu *dock_menu;
84c8548ba8Smrg
85c8548ba8Smrg@property (nonatomic, readwrite, assign) OSX_BOOL can_quit;
864642e01fSmrg
8735c4bbdfSmrg- (void)set_window_menu:(NSArray *)list;
8835c4bbdfSmrg- (void)set_window_menu_check:(NSNumber *)n;
8935c4bbdfSmrg- (void)set_apps_menu:(NSArray *)list;
906747b715Smrg#ifdef XQUARTZ_SPARKLE
9135c4bbdfSmrg- (void)setup_sparkle;
9235c4bbdfSmrg- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)
9335c4bbdfSmrg   update;
946747b715Smrg#endif
9535c4bbdfSmrg- (void)server_ready;
9635c4bbdfSmrg- (OSX_BOOL)application:(NSApplication *)app openFile:(NSString *)filename;
9735c4bbdfSmrg
9835c4bbdfSmrg- (IBAction)apps_table_show:(id)sender;
9935c4bbdfSmrg- (IBAction)apps_table_done:(id)sender;
10035c4bbdfSmrg- (IBAction)apps_table_new:(id)sender;
10135c4bbdfSmrg- (IBAction)apps_table_duplicate:(id)sender;
10235c4bbdfSmrg- (IBAction)apps_table_delete:(id)sender;
10335c4bbdfSmrg- (IBAction)bring_to_front:(id)sender;
10435c4bbdfSmrg- (IBAction)close_window:(id)sender;
10535c4bbdfSmrg- (IBAction)minimize_window:(id)sender;
10635c4bbdfSmrg- (IBAction)zoom_window:(id)sender;
10735c4bbdfSmrg- (IBAction)next_window:(id)sender;
10835c4bbdfSmrg- (IBAction)previous_window:(id)sender;
10935c4bbdfSmrg- (IBAction)enable_fullscreen_changed:(id)sender;
11035c4bbdfSmrg- (IBAction)toggle_fullscreen:(id)sender;
11135c4bbdfSmrg- (IBAction)prefs_changed:(id)sender;
11235c4bbdfSmrg- (IBAction)prefs_show:(id)sender;
11335c4bbdfSmrg- (IBAction)quit:(id)sender;
11435c4bbdfSmrg- (IBAction)x11_help:(id)sender;
1154642e01fSmrg
1164642e01fSmrg@end
1174642e01fSmrg
1184642e01fSmrg#endif /* __OBJC__ */
1194642e01fSmrg
12035c4bbdfSmrgvoid
12135c4bbdfSmrgX11ControllerMain(int argc, char **argv, char **envp);
1224642e01fSmrg
1234642e01fSmrg#endif /* X11CONTROLLER_H */
124