This is xwfriends.h in view mode; [Download] [Up]
/* xwfriends - Definitions for X-Windows specific implementation of OpenStep
Copyright (C) 1995 Free Software Foundation, Inc.
Written by: Adam Fedor <fedor@boulder.colorado.edu>
Date: Nov 1995
This file is part of the GNU Objective C User interface library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef _xwfriends_h_INCLUDE
#define _xwfriends_h_INCLUDE
#define Object X11Object /* To avoid problems with Objective C */
#define Window X11Window
#define String X11String
#include <X11/Intrinsic.h>
#undef Object
#undef Window
#undef String
#include <dpsclient/event.h>
#include <Foundation/NSGeometry.h>
/* Mapping DPS composite operators to X11 logic functions */
typedef enum {
nx_clear = 0,
nx_copy = 3,
nx_sover = 7,
nx_sin = 0,
nx_sout = 0,
nx_satop = 0,
nx_dover = 0,
nx_din = 0,
nx_dout = 0,
nx_datop = 0,
nx_xor = 0,
nx_plusd = 0,
nx_highlight = 0,
nx_plusl = 0,
} composite_map_t;
typedef enum {
gray_colorspace, rgb_colorspace, hsb_colorspace, cmyk_colorspace
} device_colorspace_t;
typedef struct _device_color {
device_colorspace_t space;
float field[6];
} device_color_t;
/* Hold information about the current device. Since XtDrawContexts never
use any device besides a window, I don't think we'll have to get any more
general than this. */
typedef struct _window_device_t
{
X11Window ident;
X11Window root;
NSRect frame;
Pixmap buffer;
char* widget; /* Should be type Widget - avoids bug in gcc-2.7.x */
int type;
int border;
int depth;
int number;
} window_device_t;
/* Specific X-Windows information used by the context */
typedef struct _XWContext_t {
Display *display;
XVisualInfo vinfo;
XStandardColormap *map;
void *gstate;
int ctxt;
} XWContext_t, *XWContext;
/* External widget compatability functions */
extern void PSgsaveview( void *aView );
extern void PSgstateview( void *aView );
extern void PSwindowdeviceview( int num, void *aView);
extern void PSgstateobject( int gst, void **gstateobj );
extern void PSxwcontext(XWContext *xwcontext);
extern void PSaddwindow(Widget window, float x, float y,
float w, float h, int type, int *num);
#endif
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.