#define BOOL xBOOL
#include "Xproto.h"
#undef BOOL
#import <Cocoa/Cocoa.h>
@interface XServer : NSObject {
int serverState;
NSRecursiveLock *serverLock;
NSMutableArray *pendingClients;
BOOL serverVisible;
BOOL rootlessMenuBarVisible;
BOOL queueShowServer;
BOOL quitWithoutQuery;
BOOL pendingAppQuitReply;
UInt32 mouseState;
BOOL sendServerEvents;
BOOL x11Active;
IBOutlet NSWindow *modeWindow;
IBOutlet NSButton *startupModeButton;
IBOutlet NSButton *startFullScreenButton;
IBOutlet NSButton *startRootlessButton;
IBOutlet NSWindow *helpWindow;
IBOutlet NSButton *startupHelpButton;
IBOutlet NSPanel *switchWindow;
IBOutlet NSMenu *windowMenu;
IBOutlet NSMenuItem *windowSeparator;
IBOutlet NSMenu *dockMenu;
int checkedWindowItem;
}
- (id)init;
- (BOOL)translateEvent:(NSEvent *)anEvent;
- (BOOL)getMousePosition:(xEvent *)xe fromEvent:(NSEvent *)anEvent;
+ (void)append:(NSString *)value toEnv:(NSString *)name;
- (BOOL)loadDisplayBundle;
- (void)startX;
- (void)finishStartX;
- (BOOL)startXClients;
- (void)runClient:(NSString *)filename;
- (void)run;
- (void)toggle;
- (void)showServer:(BOOL)show;
- (void)forceShowServer:(BOOL)show;
- (void)setRootClip:(BOOL)enable;
- (void)readPasteboard;
- (void)writePasteboard;
- (void)quitServer;
- (void)sendXEvent:(xEvent *)xe;
- (void)sendShowHide:(BOOL)show;
- (void)clientProcessDone:(int)clientStatus;
- (void)activateX11:(BOOL)state;
- (void)windowBecameKey:(NSNotification *)notification;
- (void)setX11WindowList:(NSArray *)list;
- (void)setX11WindowCheck:(NSNumber *)nn;
- (IBAction)startFullScreen:(id)sender;
- (IBAction)startRootless:(id)sender;
- (IBAction)closeHelpAndShow:(id)sender;
- (IBAction)showSwitchPanel:(id)sender;
- (IBAction)showAction:(id)sender;
- (IBAction)itemSelected:(id)sender;
- (IBAction)nextWindow:(id)sender;
- (IBAction)previousWindow:(id)sender;
- (IBAction)performClose:(id)sender;
- (IBAction)performMiniaturize:(id)sender;
- (IBAction)performZoom:(id)sender;
- (IBAction)bringAllToFront:(id)sender;
- (IBAction)copy:(id)sender;
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender;
- (void)applicationWillTerminate:(NSNotification *)aNotification;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification;
- (void)applicationDidHide:(NSNotification *)aNotification;
- (void)applicationDidUnhide:(NSNotification *)aNotification;
- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag;
- (void)applicationWillResignActive:(NSNotification *)aNotification;
- (void)applicationWillBecomeActive:(NSNotification *)aNotification;
- (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename;
- (void)handlePortMessage:(NSPortMessage *)portMessage;
@end
enum {
server_NotStarted,
server_Starting,
server_Running,
server_Quitting,
server_Done
};