mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 23:42:16 +00:00
-am
This commit is contained in:
parent
9fb73782e0
commit
20d678fe9f
3 changed files with 6 additions and 107 deletions
|
@ -117,14 +117,12 @@ extern int XGErrorHandler(Display *display, XErrorEvent *err);
|
|||
<heading>HeadlessServer</heading>
|
||||
|
||||
<p> HeadlessServer is a concrete subclass of GSDisplayServer that handles
|
||||
X-Window client communications. The class is broken into four sections.
|
||||
The main class handles setting up and closing down the display, as well
|
||||
as providing wrapper methods to access display and screen pointers. The
|
||||
WindowOps category handles window creating, display, movement, and
|
||||
other functions detailed in the GSDisplayServer(WindowOps) category.
|
||||
The EventOps category handles events received from X-Windows and the
|
||||
window manager. It implements the methods defined in the
|
||||
GSDisplayServer(EventOps) category. The last section
|
||||
events and interactions for the headless server. The purpose of the headless
|
||||
server is to allow apps which would normally have an interface under X to
|
||||
show no visible windows. This is useful for testing or for running applications
|
||||
on machines that have no display available, but where the application needs to run.
|
||||
This also can be used in continuous integration to test an application in the
|
||||
background.
|
||||
</unit>
|
||||
*/
|
||||
|
||||
|
|
|
@ -123,37 +123,6 @@ HeadlessErrorHandler(Display *display, XErrorEvent *err)
|
|||
return [ctxt HeadlessErrorHandler: display : err];
|
||||
}
|
||||
|
||||
#if 0
|
||||
static NSEvent*process_key_event (XEvent* xEvent, HeadlessServer* ctxt,
|
||||
NSEventType eventType, NSMutableArray *event_queue);
|
||||
|
||||
static unichar process_char (KeySym keysym, unsigned *eventModifierFlags);
|
||||
|
||||
static unsigned process_modifier_flags(unsigned int state);
|
||||
|
||||
static void initialize_keyboard (void);
|
||||
|
||||
static void set_up_num_lock (void);
|
||||
|
||||
// checks whether a GNUstep modifier (key_sym) is pressed when we're only able
|
||||
// to check whether X keycodes are pressed in xEvent->xkeymap;
|
||||
static int check_modifier (XEvent *xEvent, KeySym key_sym)
|
||||
{
|
||||
char *key_vector;
|
||||
int by,bi;
|
||||
int key_code = XKeysymToKeycode(xEvent->xkeymap.display, key_sym);
|
||||
|
||||
if (key_code != NoSymbol)
|
||||
{
|
||||
by = key_code / 8;
|
||||
bi = key_code % 8;
|
||||
key_vector = xEvent->xkeymap.key_vector;
|
||||
return (key_vector[by] & (1 << bi));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@interface HeadlessServer (WindowOps)
|
||||
- (void) styleoffsets: (float *) l : (float *) r : (float *) t : (float *) b
|
||||
: (unsigned int) style : (Window) win;
|
||||
|
|
|
@ -89,74 +89,6 @@ void __objc_xgcontextwindow_linking (void)
|
|||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* The next two functions derived from WindowMaker by Alfredo K. Kojima
|
||||
static unsigned char*PropGetCheckProperty(Display *dpy, Window window, Atom hint, Atom type,
|
||||
int format, int count, int *retCount)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* Setting Motif Hints for Window Managers (Nicola Pero, July 2000)
|
||||
*/
|
||||
|
||||
/*
|
||||
* Motif window hints to communicate to a window manager
|
||||
* that we want a window to have a titlebar/resize button/etc.
|
||||
*/
|
||||
|
||||
/* Motif window hints struct */
|
||||
typedef struct {
|
||||
unsigned long flags;
|
||||
unsigned long functions;
|
||||
unsigned long decorations;
|
||||
unsigned long input_mode;
|
||||
unsigned long status;
|
||||
} MwmHints;
|
||||
|
||||
/* Number of entries in the struct */
|
||||
#define PROP_MWM_HINTS_ELEMENTS 5
|
||||
|
||||
/* Now for each field in the struct, meaningful stuff to put in: */
|
||||
|
||||
/* flags */
|
||||
#define MWM_HINTS_FUNCTIONS (1L << 0)
|
||||
#define MWM_HINTS_DECORATIONS (1L << 1)
|
||||
#define MWM_HINTS_INPUT_MODE (1L << 2)
|
||||
#define MWM_HINTS_STATUS (1L << 3)
|
||||
|
||||
/* functions */
|
||||
#define MWM_FUNC_ALL (1L << 0)
|
||||
#define MWM_FUNC_RESIZE (1L << 1)
|
||||
#define MWM_FUNC_MOVE (1L << 2)
|
||||
#define MWM_FUNC_MINIMIZE (1L << 3)
|
||||
#define MWM_FUNC_MAXIMIZE (1L << 4)
|
||||
#define MWM_FUNC_CLOSE (1L << 5)
|
||||
|
||||
/* decorations */
|
||||
#define MWM_DECOR_ALL (1L << 0)
|
||||
#define MWM_DECOR_BORDER (1L << 1)
|
||||
#define MWM_DECOR_RESIZEH (1L << 2)
|
||||
#define MWM_DECOR_TITLE (1L << 3)
|
||||
#define MWM_DECOR_MENU (1L << 4)
|
||||
#define MWM_DECOR_MINIMIZE (1L << 5)
|
||||
#define MWM_DECOR_MAXIMIZE (1L << 6)
|
||||
|
||||
/* We don't use the input_mode and status fields */
|
||||
|
||||
/* The atom */
|
||||
#define _XA_MOTIF_WM_HINTS "_MOTIF_WM_HINTS"
|
||||
|
||||
|
||||
/* Now the code */
|
||||
|
||||
/*
|
||||
* End of motif hints for window manager code
|
||||
*/
|
||||
|
||||
|
||||
@interface NSEvent (WindowHack)
|
||||
- (void) _patchLocation: (NSPoint)loc;
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue