~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/programs/Xserver/hw/darwin/quartz/XServer.h

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
//  XServer.h
 
3
//
 
4
/*
 
5
 * Copyright (c) 2001 Andreas Monitzer. All Rights Reserved.
 
6
 * Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved.
 
7
 *
 
8
 * Permission is hereby granted, free of charge, to any person obtaining a
 
9
 * copy of this software and associated documentation files (the
 
10
 * "Software"), to deal in the Software without restriction, including
 
11
 * without limitation the rights to use, copy, modify, merge, publish,
 
12
 * distribute, sublicense, and/or sell copies of the Software, and to
 
13
 * permit persons to whom the Software is furnished to do so, subject to
 
14
 * the following conditions:
 
15
 *
 
16
 * The above copyright notice and this permission notice shall be included
 
17
 * in all copies or substantial portions of the Software.
 
18
 *
 
19
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 
20
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 
21
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 
22
 * IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY
 
23
 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 
24
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 
25
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
26
 *
 
27
 * Except as contained in this notice, the name(s) of the above copyright
 
28
 * holders shall not be used in advertising or otherwise to promote the
 
29
 * sale, use or other dealings in this Software without prior written
 
30
 * authorization.
 
31
 */
 
32
/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XServer.h,v 1.8 2003/01/23 00:34:26 torrey Exp $ */
 
33
 
 
34
#define BOOL xBOOL
 
35
#include "Xproto.h"
 
36
#undef BOOL
 
37
 
 
38
#import <Cocoa/Cocoa.h>
 
39
 
 
40
@interface XServer : NSObject {
 
41
    // server state
 
42
    int serverState;
 
43
    NSRecursiveLock *serverLock;
 
44
    BOOL serverVisible;
 
45
    BOOL rootlessMenuBarVisible;
 
46
    BOOL queueShowServer;
 
47
    UInt32 mouseState;
 
48
    Class windowClass;
 
49
 
 
50
    // server event queue
 
51
    BOOL sendServerEvents;
 
52
    int eventWriteFD;
 
53
 
 
54
    // Aqua interface
 
55
    IBOutlet NSWindow *modeWindow;
 
56
    IBOutlet NSButton *startupModeButton;
 
57
    IBOutlet NSButton *startFullScreenButton;
 
58
    IBOutlet NSButton *startRootlessButton;
 
59
    IBOutlet NSWindow *helpWindow;
 
60
    IBOutlet NSButton *startupHelpButton;
 
61
    IBOutlet NSPanel *switchWindow;
 
62
}
 
63
 
 
64
- (id)init;
 
65
 
 
66
- (BOOL)translateEvent:(NSEvent *)anEvent;
 
67
- (BOOL)getMousePosition:(xEvent *)xe fromEvent:(NSEvent *)anEvent;
 
68
 
 
69
+ (void)append:(NSString *)value toEnv:(NSString *)name;
 
70
 
 
71
- (void)startX;
 
72
- (void)finishStartX;
 
73
- (BOOL)startXClients;
 
74
- (void)run;
 
75
- (void)toggle;
 
76
- (void)showServer:(BOOL)show;
 
77
- (void)forceShowServer:(BOOL)show;
 
78
- (void)setRootClip:(BOOL)enable;
 
79
- (void)readPasteboard;
 
80
- (void)writePasteboard;
 
81
- (void)quitServer;
 
82
- (void)sendXEvent:(xEvent *)xe;
 
83
- (void)sendShowHide:(BOOL)show;
 
84
- (void)clientProcessDone:(int)clientStatus;
 
85
 
 
86
// Aqua interface actions
 
87
- (IBAction)startFullScreen:(id)sender;
 
88
- (IBAction)startRootless:(id)sender;
 
89
- (IBAction)closeHelpAndShow:(id)sender;
 
90
- (IBAction)showAction:(id)sender;
 
91
 
 
92
// NSApplication delegate
 
93
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender;
 
94
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification;
 
95
- (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag;
 
96
- (void)applicationWillResignActive:(NSNotification *)aNotification;
 
97
- (void)applicationWillBecomeActive:(NSNotification *)aNotification;
 
98
 
 
99
// NSPort delegate
 
100
- (void)handlePortMessage:(NSPortMessage *)portMessage;
 
101
 
 
102
@end
 
103
 
 
104
// X server states
 
105
enum {
 
106
    server_NotStarted,
 
107
    server_Starting,
 
108
    server_Running,
 
109
    server_Quitting,
 
110
    server_Done
 
111
};
 
112