1/* X11Application.h -- subclass of NSApplication to multiplex events
2 *
3 * Copyright (c) 2002-2012 Apple Inc. All rights reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person
6 * obtaining a copy of this software and associated documentation files
7 * (the "Software"), to deal in the Software without restriction,
8 * including without limitation the rights to use, copy, modify, merge,
9 * publish, distribute, sublicense, and/or sell copies of the Software,
10 * and to permit persons to whom the Software is furnished to do so,
11 * subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be
14 * included in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 * NONINFRINGEMENT.  IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT
20 * HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 * DEALINGS IN THE SOFTWARE.
24 *
25 * Except as contained in this notice, the name(s) of the above
26 * copyright holders shall not be used in advertising or otherwise to
27 * promote the sale, use or other dealings in this Software without
28 * prior written authorization.
29 */
30
31#ifndef X11APPLICATION_H
32#define X11APPLICATION_H 1
33
34#include <X11/Xdefs.h>
35
36#if __OBJC__
37
38#import "X11Controller.h"
39
40@interface X11Application : NSApplication
41
42@property (nonatomic, readwrite, strong) X11Controller *controller;
43@property (nonatomic, readonly, assign) OSX_BOOL x_active;
44
45@end
46
47extern X11Application * X11App;
48
49#endif /* __OBJC__ */
50
51void
52X11ApplicationSetWindowMenu(int nitems, const char **items,
53                            const char *shortcuts);
54void
55X11ApplicationSetWindowMenuCheck(int idx);
56void
57X11ApplicationSetFrontProcess(void);
58void
59X11ApplicationSetCanQuit(int state);
60void
61X11ApplicationServerReady(void);
62void
63X11ApplicationShowHideMenubar(int state);
64void
65X11ApplicationLaunchClient(const char *cmd);
66
67Bool
68X11ApplicationCanEnterRandR(void);
69
70void
71X11ApplicationMain(int argc, char **argv, char **envp);
72
73extern Bool XQuartzScrollInDeviceDirection;
74
75#endif /* X11APPLICATION_H */
76