1 /* xscreensaver, Copyright (c) 1991-2014 Jamie Zawinski <jwz@jwz.org>
3 * Permission to use, copy, modify, distribute, and sell this software and its
4 * documentation for any purpose is hereby granted without fee, provided that
5 * the above copyright notice appear in all copies and that both that
6 * copyright notice and this permission notice appear in supporting
7 * documentation. No representations are made about the suitability of this
8 * software for any purpose. It is provided "as is" without express or
14 But it's a bunch of function definitions that bear some resemblance to
15 Xlib and that do Cocoa-ish things that bear some resemblance to the
16 things that Xlib might have done.
22 extern void jwxyz_abort(const char *fmt, ...) __dead2;
23 #define abort() jwxyz_abort("abort in %s:%d", __FUNCTION__, __LINE__)
27 typedef void * XPointer;
28 typedef unsigned long Time;
29 typedef unsigned int KeySym;
30 typedef unsigned int KeyCode;
31 typedef unsigned int VisualID;
33 typedef struct jwxyz_Display Display;
34 typedef struct jwxyz_Screen Screen;
35 typedef struct jwxyz_Visual Visual;
36 typedef struct jwxyz_Drawable * Drawable;
37 typedef struct jwxyz_Colormap * Colormap;
38 typedef struct jwxyz_GC * GC;
39 typedef struct jwxyz_XColor XColor;
40 typedef struct jwxyz_XGCValues XGCValues;
41 typedef struct jwxyz_XPoint XPoint;
42 typedef struct jwxyz_XSegment XSegment;
43 typedef struct jwxyz_XRectangle XRectangle;
44 typedef struct jwxyz_XArc XArc;
45 typedef struct jwxyz_XWindowAttributes XWindowAttributes;
46 typedef struct jwxyz_XrmOptionDescRec XrmOptionDescRec;
47 typedef struct jwxyz_XrmDatabase * XrmDatabase;
48 typedef struct jwxyz_XImage XImage;
49 typedef struct jwxyz_XFontStruct XFontStruct;
50 typedef struct jwxyz_Font * Font;
51 typedef struct jwxyz_XCharStruct XCharStruct;
52 typedef struct jwxyz_XComposeStatus XComposeStatus;
53 typedef struct jwxyz_XPixmapFormatValues XPixmapFormatValues;
55 typedef union jwxyz_XEvent XEvent;
56 typedef struct jwxyz_XAnyEvent XAnyEvent;
57 typedef struct jwxyz_XKeyEvent XKeyEvent;
58 typedef struct jwxyz_XMotionEvent XMotionEvent;
59 typedef struct jwxyz_XButtonEvent XButtonEvent;
60 typedef XKeyEvent XKeyPressedEvent;
61 typedef XKeyEvent XKeyReleasedEvent;
62 typedef XMotionEvent XPointerMovedEvent;
63 typedef XButtonEvent XButtonPressedEvent;
64 typedef XButtonEvent XButtonReleasedEvent;
67 /* Not technically Xlib... */
68 typedef struct jwxyz_GLXContext * GLXContext;
69 typedef struct jwxyz_XtAppContext * XtAppContext;
70 typedef struct jwxyz_XtIntervalId * XtIntervalId;
71 typedef struct jwxyz_XtInputId * XtInputId;
72 typedef void * XtPointer;
73 typedef unsigned long XtInputMask;
74 #define XtInputReadMask (1L<<0)
75 #define XtInputWriteMask (1L<<1)
76 #define XtInputExceptMask (1L<<2)
79 #define XtIMAlternateInput 4
81 #define XtIMAll (XtIMXEvent | XtIMTimer | XtIMAlternateInput | XtIMSignal)
89 #define Window Drawable
90 #define Pixmap Drawable
92 #define XrmoptionNoArg 0
93 #define XrmoptionSepArg 1
95 #define CoordModeOrigin 0
96 #define CoordModePrevious 1
99 #define LineOnOffDash 1
100 #define LineDoubleDash 2
105 #define CapProjecting 3
113 #define FillStippled 2
114 #define FillOpaqueStippled 3
116 #define EvenOddRule 0
117 #define WindingRule 1
132 #define StaticColor 2
133 #define PseudoColor 3
135 #define DirectColor 5
141 #define DoGreen (1<<1)
142 #define DoBlue (1<<2)
144 #define GCFunction (1L<<0)
145 #define GCPlaneMask (1L<<1)
146 #define GCForeground (1L<<2)
147 #define GCBackground (1L<<3)
148 #define GCLineWidth (1L<<4)
149 #define GCLineStyle (1L<<5)
150 #define GCCapStyle (1L<<6)
151 #define GCJoinStyle (1L<<7)
152 #define GCFillStyle (1L<<8)
153 #define GCFillRule (1L<<9)
154 #define GCTile (1L<<10)
155 #define GCStipple (1L<<11)
156 #define GCTileStipXOrigin (1L<<12)
157 #define GCTileStipYOrigin (1L<<13)
158 #define GCFont (1L<<14)
159 #define GCSubwindowMode (1L<<15)
160 #define GCGraphicsExposures (1L<<16)
161 #define GCClipXOrigin (1L<<17)
162 #define GCClipYOrigin (1L<<18)
163 #define GCClipMask (1L<<19)
164 #define GCDashOffset (1L<<20)
165 #define GCDashList (1L<<21)
166 #define GCArcMode (1L<<22)
170 #define ButtonPress 4
171 #define ButtonRelease 5
172 #define MotionNotify 6
174 #define GraphicsExpose 13
176 #define VisibilityNotify 15
178 #define ClipByChildren 0
179 #define IncludeInferiors 1
181 #define KeyPressMask (1L<<0)
182 #define KeyReleaseMask (1L<<1)
183 #define ButtonPressMask (1L<<2)
184 #define ButtonReleaseMask (1L<<3)
185 #define PointerMotionMask (1L<<6)
193 #define ShiftMask (1<<0)
194 #define LockMask (1<<1)
195 #define ControlMask (1<<2)
196 #define Mod1Mask (1<<3)
197 #define Mod2Mask (1<<4)
198 #define Mod3Mask (1<<5)
199 #define Mod4Mask (1<<6)
200 #define Mod5Mask (1<<7)
201 #define Button1Mask (1<<8)
202 #define Button2Mask (1<<9)
203 #define Button3Mask (1<<10)
204 #define Button4Mask (1<<11)
205 #define Button5Mask (1<<12)
207 #define XK_Shift_L 0xFFE1
208 #define XK_Shift_R 0xFFE2
209 #define XK_Control_L 0xFFE3
210 #define XK_Control_R 0xFFE4
211 #define XK_Caps_Lock 0xFFE5
212 #define XK_Shift_Lock 0xFFE6
213 #define XK_Meta_L 0xFFE7
214 #define XK_Meta_R 0xFFE8
215 #define XK_Alt_L 0xFFE9
216 #define XK_Alt_R 0xFFEA
217 #define XK_Super_L 0xFFEB
218 #define XK_Super_R 0xFFEC
219 #define XK_Hyper_L 0xFFED
220 #define XK_Hyper_R 0xFFEE
222 #define XK_Home 0xFF50
223 #define XK_Left 0xFF51
225 #define XK_Right 0xFF53
226 #define XK_Down 0xFF54
227 #define XK_Prior 0xFF55
228 #define XK_Page_Up 0xFF55
229 #define XK_Next 0xFF56
230 #define XK_Page_Down 0xFF56
231 #define XK_End 0xFF57
232 #define XK_Begin 0xFF58
234 #define GXclear 0x0 /* 0 */
235 #define GXand 0x1 /* src AND dst */
236 // #define GXandReverse 0x2 /* src AND NOT dst */
237 #define GXcopy 0x3 /* src */
238 // #define GXandInverted 0x4 /* NOT src AND dst */
239 // #define GXnoop 0x5 /* dst */
240 #define GXxor 0x6 /* src XOR dst */
241 #define GXor 0x7 /* src OR dst */
242 // #define GXnor 0x8 /* NOT src AND NOT dst */
243 // #define GXequiv 0x9 /* NOT src XOR dst */
244 // #define GXinvert 0xa /* NOT dst */
245 // #define GXorReverse 0xb /* src OR NOT dst */
246 // #define GXcopyInverted 0xc /* NOT src */
247 // #define GXorInverted 0xd /* NOT src OR dst */
248 // #define GXnand 0xe /* NOT src OR NOT dst */
249 #define GXset 0xf /* 1 */
251 #define DefaultScreen(dpy) (0)
252 #define BlackPixelOfScreen(s) (0xFF000000)
253 #define WhitePixelOfScreen(s) (0xFFFFFFFF)
254 #define BlackPixel(dpy,n) BlackPixelOfScreen(0)
255 #define WhitePixel(dpy,n) WhitePixelOfScreen(0)
256 #define CellsOfScreen(s) (0x00FFFFFF)
257 #define XFree(x) free(x)
258 #define BitmapPad(dpy) (8)
259 #define BitmapBitOrder(dpy) (MSBFirst)
260 #define ImageByteOrder(dpy) (MSBFirst)
261 #define DisplayOfScreen XDisplayOfScreen
262 #define DefaultScreenOfDisplay XDefaultScreenOfDisplay
263 #define ScreenOfDisplay(dpy,n) DefaultScreenOfDisplay(dpy)
264 #define DefaultVisualOfScreen XDefaultVisualOfScreen
265 #define DefaultColormapOfScreen(s) (0)
266 #define RootWindow XRootWindow
267 #define RootWindowOfScreen(s) RootWindow(DisplayOfScreen(s),0)
268 #define DisplayWidth XDisplayWidth
269 #define DisplayHeight XDisplayHeight
270 #define XMaxRequestSize(dpy) (65535)
272 #define ScreenCount(dpy) jwxyz_ScreenCount(dpy)
273 extern int jwxyz_ScreenCount(Display *);
275 extern Display *jwxyz_make_display (void *nsview, void *cgc);
276 extern void jwxyz_free_display (Display *);
277 extern void *jwxyz_window_view (Window);
278 extern void jwxyz_window_resized (Display *, Window,
281 extern void jwxyz_mouse_moved (Display *, Window, int x, int y);
282 extern void jwxyz_flush_context (Display *);
284 extern Window XRootWindow (Display *, int screen);
285 extern Screen *XDefaultScreenOfDisplay (Display *);
286 extern Visual *XDefaultVisualOfScreen (Screen *);
287 extern Display *XDisplayOfScreen (Screen *);
288 extern int XDisplayNumberOfScreen (Screen *);
289 extern int XScreenNumberOfScreen (Screen *);
290 extern int XDisplayWidth (Display *, int);
291 extern int XDisplayHeight (Display *, int);
293 extern int XDrawPoint (Display *, Drawable, GC, int x, int y);
294 extern int XDrawPoints (Display *, Drawable, GC, XPoint *, int n, int mode);
295 extern int XDrawSegments (Display *, Drawable, GC, XSegment *, int n);
297 extern GC XCreateGC (Display *, Drawable, unsigned long mask, XGCValues *);
298 extern int XChangeGC (Display *, GC, unsigned long mask, XGCValues *);
299 extern int XFreeGC (Display *, GC);
301 extern int XClearWindow (Display *, Window);
302 extern int XClearArea (Display *, Window, int x, int y, int w, int h,Bool exp);
303 extern int XSetWindowBackground (Display *, Window, unsigned long);
304 extern Status XGetWindowAttributes (Display *, Window, XWindowAttributes *);
305 extern Status XGetGeometry (Display *, Drawable, Window *root_ret,
306 int *x_ret, int *y_ret,
307 unsigned int *w_ret, unsigned int *h_ret,
308 unsigned int *bw_ret, unsigned int *depth_ret);
309 extern Status XAllocColor (Display *, Colormap, XColor *);
310 extern Status XAllocColorCells (Display *, Colormap, Bool contig,
311 unsigned long *pmret, unsigned int npl,
312 unsigned long *pxret, unsigned int npx);
313 extern int XStoreColors (Display *, Colormap, XColor *, int n);
314 extern int XStoreColor (Display *, Colormap, XColor *);
315 extern Status XParseColor(Display *, Colormap, const char *spec, XColor *ret);
316 extern Status XAllocNamedColor (Display *, Colormap, char *name,
317 XColor *screen_ret, XColor *exact_ret);
318 extern int XQueryColor (Display *, Colormap, XColor *);
319 extern int XQueryColors(Display *, Colormap colormap, XColor *, int ncolors);
321 extern int XSetForeground (Display *, GC, unsigned long);
322 extern int XSetBackground (Display *, GC, unsigned long);
323 extern int XSetFunction (Display *, GC, int);
324 extern int XSetSubwindowMode (Display *, GC, int);
325 extern int XSetLineAttributes (Display *, GC, unsigned int line_width,
326 int line_style, int cap_style, int join_style);
327 extern int XSetClipMask (Display *, GC, Pixmap);
328 extern int XSetClipOrigin (Display *, GC, int x, int y);
329 extern int jwxyz_XSetAlphaAllowed (Display *, GC, Bool);
330 extern int jwxyz_XSetAntiAliasing (Display *, GC, Bool);
332 extern int XFlush (Display *);
333 extern int XSync (Display *, Bool);
334 extern int XFreeColors (Display *, Colormap, unsigned long *px, int n,
335 unsigned long planes);
336 extern int XFillPolygon (Display *, Drawable, GC,
337 XPoint * points, int npoints, int shape, int mode);
338 extern int XCopyArea (Display *, Drawable src, Drawable dest, GC,
339 int src_x, int src_y,
340 unsigned int width, unsigned int height,
341 int dest_x, int dest_y);
342 extern int XCopyPlane (Display *, Drawable, Drawable, GC,
343 int src_x, int src_y,
344 unsigned width, int height,
345 int dest_x, int dest_y,
346 unsigned long plane);
348 extern int XDrawLine (Display *, Drawable, GC, int x1, int y1, int x2, int y2);
349 extern int XDrawLines (Display *, Drawable, GC, XPoint *, int n, int mode);
350 extern int XDrawArc (Display *, Drawable, GC, int x, int y,
351 unsigned int width, unsigned int height,
352 int angle1, int angle2);
353 extern int XFillArc (Display *, Drawable, GC, int x, int y,
354 unsigned int width, unsigned int height,
355 int angle1, int angle2);
356 extern int XDrawArcs (Display *, Drawable, GC, XArc *arcs, int narcs);
357 extern int XFillArcs (Display *, Drawable, GC, XArc *arcs, int narcs);
358 extern int XDrawRectangle (Display *, Drawable, GC, int x, int y,
359 unsigned int width, unsigned int height);
360 extern int XFillRectangle (Display *, Drawable, GC, int x, int y,
361 unsigned int width, unsigned int height);
362 extern int XFillRectangles (Display *, Drawable, GC, XRectangle *, int n);
364 extern int XDrawString (Display *, Drawable, GC, int x, int y, const char *,
366 extern int XDrawImageString (Display *, Drawable, GC, int x, int y,
367 const char *, int len);
369 extern Bool XQueryPointer (Display *, Window, Window *root_ret,
371 int *root_x_ret, int *root_y_ret,
372 int *win_x_ret, int *win_y_ret,
373 unsigned int *mask_ret);
374 extern int XLookupString (XKeyEvent *, char *ret, int size, KeySym *ks_ret,
376 extern KeySym XKeycodeToKeysym (Display *, KeyCode, int index);
378 extern Status XInitImage (XImage *);
379 extern XImage *XCreateImage (Display *, Visual *, unsigned int depth,
380 int format, int offset, char *data,
381 unsigned int width, unsigned int height,
382 int bitmap_pad, int bytes_per_line);
383 extern XImage *XSubImage (XImage *, int x, int y,
384 unsigned int w, unsigned int h);
386 extern unsigned long XGetPixel (XImage *, int x, int y);
387 extern int XPutPixel (XImage *, int x, int y, unsigned long);
388 extern int XDestroyImage (XImage *);
389 extern int XPutImage (Display *, Drawable, GC, XImage *,
390 int src_x, int src_y, int dest_x, int dest_y,
391 unsigned int w, unsigned int h);
392 extern XImage *XGetImage (Display *, Drawable, int x, int y,
393 unsigned int w, unsigned int h,
394 unsigned long pm, int fmt);
395 extern Pixmap XCreatePixmapFromBitmapData (Display *, Drawable,
397 unsigned int w, unsigned int h,
401 extern XPixmapFormatValues *XListPixmapFormats (Display *, int *count_ret);
403 extern void jwxyz_draw_NSImage_or_CGImage (Display *, Drawable,
404 Bool nsimg_p, void *NSImage_arg,
405 XRectangle *geom_ret,
408 extern int XSetGraphicsExposures (Display *, GC, Bool);
409 extern Bool XTranslateCoordinates (Display *, Window src_w, Window dest_w,
410 int src_x, int src_y,
411 int *dest_x_ret, int *dest_y_ret,
414 extern Font XLoadFont (Display *, const char *);
415 extern XFontStruct * XQueryFont (Display *, Font);
416 extern XFontStruct * XLoadQueryFont (Display *, const char *);
417 extern int XFreeFontInfo (char **names, XFontStruct *info, int n);
418 extern int XFreeFont (Display *, XFontStruct *);
419 extern int XUnloadFont (Display *, Font);
420 extern int XTextExtents (XFontStruct *, const char *, int length,
421 int *dir_ret, int *ascent_ret, int *descent_ret,
422 XCharStruct *overall_ret);
423 extern int XTextWidth (XFontStruct *, const char *, int length);
424 extern int XSetFont (Display *, GC, Font);
426 extern Pixmap XCreatePixmap (Display *, Drawable,
427 unsigned int width, unsigned int height,
429 extern int XFreePixmap (Display *, Pixmap);
432 extern XtAppContext XtDisplayToApplicationContext (Display *);
433 typedef void (*XtTimerCallbackProc) (XtPointer closure, XtIntervalId *);
434 typedef void (*XtInputCallbackProc) (XtPointer closure, int *fd, XtInputId *);
435 extern XtIntervalId XtAppAddTimeOut (XtAppContext, unsigned long usecs,
436 XtTimerCallbackProc, XtPointer closure);
437 extern void XtRemoveTimeOut (XtIntervalId);
438 extern XtInputId XtAppAddInput (XtAppContext, int fd, XtPointer flags,
439 XtInputCallbackProc, XtPointer closure);
440 extern void XtRemoveInput (XtInputId);
441 extern XtInputMask XtAppPending (XtAppContext);
442 extern void XtAppProcessEvent (XtAppContext, XtInputMask);
443 extern struct jwxyz_sources_data *display_sources_data (Display *);
445 // Some GLX stuff that also doesn't technically belong here...
446 // from XScreenSaverGLView.m
447 extern void glXSwapBuffers (Display *, Window);
448 extern void glXMakeCurrent (Display *, Window, GLXContext);
450 // also declared in utils/visual.h
451 extern int has_writable_cells (Screen *, Visual *);
452 extern int visual_depth (Screen *, Visual *);
453 extern int visual_cells (Screen *, Visual *);
454 extern int visual_class (Screen *, Visual *);
455 extern int get_bits_per_pixel (Display *, int);
457 // also declared in utils/grabclient.h
458 extern Bool use_subwindow_mode_p (Screen *, Window);
461 struct jwxyz_Visual {
462 VisualID visualid; /* visual id of this visual */
463 int class; /* class of screen (monochrome, etc.) */
464 unsigned long red_mask, green_mask, blue_mask; /* mask values */
465 int bits_per_rgb; /* log base 2 of distinct color values */
466 // int map_entries; /* color map entries */
469 struct jwxyz_XGCValues {
470 int function; /* logical operation */
472 unsigned long plane_mask;/* plane mask */
474 unsigned long foreground;/* foreground pixel */
475 unsigned long background;/* background pixel */
476 int line_width; /* line width */
478 int line_style; /* LineSolid, LineOnOffDash, LineDoubleDash */
480 int cap_style; /* CapNotLast, CapButt, CapRound, CapProjecting */
481 int join_style; /* JoinMiter, JoinRound, JoinBevel */
483 int fill_style; /* FillSolid, FillTiled,
484 FillStippled, FillOpaeueStippled */
486 int fill_rule; /* EvenOddRule, WindingRule */
488 int arc_mode; /* ArcChord, ArcPieSlice */
489 Pixmap tile; /* tile pixmap for tiling operations */
490 Pixmap stipple; /* stipple 1 plane pixmap for stipping */
491 int ts_x_origin; /* offset for tile or stipple operations */
494 Font font; /* default text font for text operations */
495 int subwindow_mode; /* ClipByChildren, IncludeInferiors */
497 Bool graphics_exposures;/* boolean, should exposures be generated */
499 int clip_x_origin; /* origin for clipping */
501 Pixmap clip_mask; /* bitmap clipping; other calls for rects */
503 int dash_offset; /* patterned/dashed line information */
507 Bool alpha_allowed_p; /* jwxyz extension: whether pixel values may have
508 a non-opaque alpha component. */
509 Bool antialias_p; /* jwxyz extension: whether Quartz should draw
510 with antialiasing. */
513 struct jwxyz_XWindowAttributes {
514 int x, y; /* location of window */
515 int width, height; /* width and height of window */
516 int border_width; /* border width of window */
517 int depth; /* depth of window */
518 Visual *visual; /* the associated visual structure */
520 Window root; /* root of screen containing window */
521 int class; /* InputOutput, InputOnly*/
522 int bit_gravity; /* one of bit gravity values */
523 int win_gravity; /* one of the window gravity values */
524 int backing_store; /* NotUseful, WhenMapped, Always */
525 unsigned long backing_planes;/* planes to be preserved if possible */
526 unsigned long backing_pixel;/* value to be used when restoring planes */
527 Bool save_under; /* boolean, should bits under be saved? */
529 Colormap colormap; /* color map to be associated with window */
531 Bool map_installed; /* boolean, is color map currently installed*/
532 int map_state; /* IsUnmapped, IsUnviewable, IsViewable */
533 long all_event_masks; /* set of events all people have interest in*/
534 long your_event_mask; /* my event mask */
535 long do_not_propagate_mask; /* set of events that should not propagate */
536 Bool override_redirect; /* boolean value for override-redirect */
538 Screen *screen; /* back pointer to correct screen */
541 struct jwxyz_XColor {
543 unsigned short red, green, blue;
544 char flags; /* do_red, do_green, do_blue */
548 struct jwxyz_XPoint {
552 struct jwxyz_XSegment {
553 short x1, y1, x2, y2;
556 struct jwxyz_XRectangle {
558 unsigned short width, height;
563 unsigned short width, height;
564 short angle1, angle2;
568 struct jwxyz_XrmOptionDescRec {
575 struct jwxyz_XAnyEvent {
578 unsigned long serial;
585 struct jwxyz_XKeyEvent {
588 unsigned long serial;
599 unsigned int keycode;
605 struct jwxyz_XButtonEvent {
608 unsigned long serial;
627 struct jwxyz_XMotionEvent {
630 unsigned long serial;
653 XButtonEvent xbutton;
654 XMotionEvent xmotion;
657 struct jwxyz_XImage {
658 int width, height; /* size of image */
659 int xoffset; /* number of pixels offset in X direction */
660 int format; /* XYBitmap, XYPixmap, ZPixmap */
661 char *data; /* pointer to image data */
662 int byte_order; /* data byte order, LSBFirst, MSBFirst */
663 int bitmap_unit; /* quant. of scanline 8, 16, 32 */
664 int bitmap_bit_order; /* LSBFirst, MSBFirst */
665 int bitmap_pad; /* 8, 16, 32 either XY or ZPixmap */
666 int depth; /* depth of image */
667 int bytes_per_line; /* accelarator to next line */
668 int bits_per_pixel; /* bits per pixel (ZPixmap) */
669 unsigned long red_mask; /* bits in z arrangment */
670 unsigned long green_mask;
671 unsigned long blue_mask;
672 // XPointer obdata; /* hook for the object routines to hang on */
673 struct funcs { /* image manipulation routines */
675 XImage *(*create_image)(
676 Display* /* display */,
677 Visual* /* visual */,
678 unsigned int /* depth */,
682 unsigned int /* width */,
683 unsigned int /* height */,
684 int /* bitmap_pad */,
685 int /* bytes_per_line */);
686 int (*destroy_image) (XImage *);
688 unsigned long (*get_pixel) (XImage *, int, int);
689 int (*put_pixel) (XImage *, int, int, unsigned long);
691 XImage *(*sub_image) (XImage *, int, int, unsigned int, unsigned int);
692 int (*add_pixel) (XImage *, long);
697 struct jwxyz_XCharStruct {
698 short lbearing; /* origin to left edge of raster */
699 short rbearing; /* origin to right edge of raster */
700 short width; /* advance to next char's origin */
701 short ascent; /* baseline to top edge of raster */
702 short descent; /* baseline to bottom edge of raster */
704 unsigned short attributes; /* per char flags (not predefined) */
708 struct jwxyz_XFontStruct {
710 XExtData *ext_data; /* hook for extension to hang data */
712 Font fid; /* Font id for this font */
714 unsigned direction; /* hint about direction the font is painted */
716 unsigned min_char_or_byte2; /* first character */
717 unsigned max_char_or_byte2; /* last character */
719 unsigned min_byte1; /* first row that exists */
720 unsigned max_byte1; /* last row that exists */
721 Bool all_chars_exist; /* flag if all characters have non-zero size*/
723 unsigned default_char; /* char to print for undefined character */
725 int n_properties; /* how many properties there are */
726 XFontProp *properties; /* pointer to array of additional properties*/
728 XCharStruct min_bounds; /* minimum bounds over all existing char*/
729 XCharStruct max_bounds; /* maximum bounds over all existing char*/
730 XCharStruct *per_char; /* first_char to last_char information */
731 int ascent; /* log. extent above baseline for spacing */
732 int descent; /* log. descent below baseline for spacing */
735 struct jwxyz_XComposeStatus {
739 struct jwxyz_XPixmapFormatValues {
745 #endif /* __JWXYZ_H__ */