1#ifndef XKBUIPRIV_H 2#define XKBUIPRIV_H 1 3/* $XConsortium: XKBuiPriv.h /main/2 1995/12/07 21:18:19 kaleb $ */ 4/************************************************************ 5 Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc. 6 7 Permission to use, copy, modify, and distribute this 8 software and its documentation for any purpose and without 9 fee is hereby granted, provided that the above copyright 10 notice appear in all copies and that both that copyright 11 notice and this permission notice appear in supporting 12 documentation, and that the name of Silicon Graphics not be 13 used in advertising or publicity pertaining to distribution 14 of the software without specific prior written permission. 15 Silicon Graphics makes no representation about the suitability 16 of this software for any purpose. It is provided "as is" 17 without any express or implied warranty. 18 19 SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 20 SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 21 AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON 22 GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 23 DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 24 DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 25 OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH 26 THE USE OR PERFORMANCE OF THIS SOFTWARE. 27 28 ********************************************************/ 29 30#include "XKBui.h" 31 32typedef struct _XkbUI_Point { 33 double x; 34 double y; 35} XkbUI_PointRec,*XkbUI_PointPtr; 36 37typedef struct _XkbUI_View { 38 Display * dpy; 39 XkbDescPtr xkb; 40 Window win; 41 GC gc; 42 XkbUI_ViewOptsRec opts; 43 unsigned int canvas_width; 44 unsigned int canvas_height; 45 unsigned char state[XkbMaxLegalKeyCode]; 46 47 double xscale; 48 double yscale; 49} XkbUI_ViewRec; 50 51#define _XkbAlloc(s) malloc((s)) 52#define _XkbCalloc(n,s) calloc((n),(s)) 53#define _XkbRealloc(o,s) realloc((o),(s)) 54#define _XkbTypedAlloc(t) ((t *)malloc(sizeof(t))) 55#define _XkbTypedCalloc(n,t) ((t *)calloc((n),sizeof(t))) 56#define _XkbTypedRealloc(o,n,t) \ 57 ((o)?(t *)realloc((o),(n)*sizeof(t)):_XkbTypedCalloc(n,t)) 58#define _XkbClearElems(a,f,l,t) bzero(&(a)[f],((l)-(f)+1)*sizeof(t)) 59#define _XkbFree(p) free(p) 60 61 /* 62 * private values for key appearance flags 63 * must not conflict with values from XKBui.h 64 */ 65#define XkbUI_Obscured (1<<7) 66 67_XFUNCPROTOBEGIN 68 69_XFUNCPROTOEND 70 71#endif /* XKBUIPRIV_H */ 72