1382ff0afSmrg#ifndef XKBUIPRIV_H
2382ff0afSmrg#define	XKBUIPRIV_H 1
3382ff0afSmrg/* $XConsortium: XKBuiPriv.h /main/2 1995/12/07 21:18:19 kaleb $ */
4382ff0afSmrg/************************************************************
5382ff0afSmrg Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc.
6382ff0afSmrg
7382ff0afSmrg Permission to use, copy, modify, and distribute this
8382ff0afSmrg software and its documentation for any purpose and without
9382ff0afSmrg fee is hereby granted, provided that the above copyright
10382ff0afSmrg notice appear in all copies and that both that copyright
11382ff0afSmrg notice and this permission notice appear in supporting
12382ff0afSmrg documentation, and that the name of Silicon Graphics not be
13382ff0afSmrg used in advertising or publicity pertaining to distribution
14382ff0afSmrg of the software without specific prior written permission.
15382ff0afSmrg Silicon Graphics makes no representation about the suitability
16382ff0afSmrg of this software for any purpose. It is provided "as is"
17382ff0afSmrg without any express or implied warranty.
18382ff0afSmrg
19382ff0afSmrg SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
20382ff0afSmrg SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
21382ff0afSmrg AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON
22382ff0afSmrg GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
23382ff0afSmrg DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
24382ff0afSmrg DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
25382ff0afSmrg OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
26382ff0afSmrg THE USE OR PERFORMANCE OF THIS SOFTWARE.
27382ff0afSmrg
28382ff0afSmrg ********************************************************/
29382ff0afSmrg
30382ff0afSmrg#include "XKBui.h"
31382ff0afSmrg
32382ff0afSmrgtypedef struct _XkbUI_Point {
33382ff0afSmrg	double			x;
34382ff0afSmrg	double			y;
35382ff0afSmrg} XkbUI_PointRec,*XkbUI_PointPtr;
36382ff0afSmrg
37382ff0afSmrgtypedef struct _XkbUI_View {
38382ff0afSmrg	Display *		dpy;
39382ff0afSmrg	XkbDescPtr		xkb;
40382ff0afSmrg	Window			win;
41382ff0afSmrg	GC			gc;
42382ff0afSmrg	XkbUI_ViewOptsRec	opts;
43382ff0afSmrg	unsigned int		canvas_width;
44382ff0afSmrg	unsigned int		canvas_height;
45382ff0afSmrg	unsigned char		state[XkbMaxLegalKeyCode];
46382ff0afSmrg
47382ff0afSmrg	double			xscale;
48382ff0afSmrg	double			yscale;
49382ff0afSmrg} XkbUI_ViewRec;
50382ff0afSmrg
51382ff0afSmrg#define	_XkbAlloc(s)		malloc((s))
52382ff0afSmrg#define	_XkbCalloc(n,s)		calloc((n),(s))
53382ff0afSmrg#define	_XkbRealloc(o,s)	realloc((o),(s))
54382ff0afSmrg#define	_XkbTypedAlloc(t)	((t *)malloc(sizeof(t)))
55382ff0afSmrg#define	_XkbTypedCalloc(n,t)	((t *)calloc((n),sizeof(t)))
56382ff0afSmrg#define	_XkbTypedRealloc(o,n,t) \
57382ff0afSmrg	((o)?(t *)realloc((o),(n)*sizeof(t)):_XkbTypedCalloc(n,t))
58382ff0afSmrg#define	_XkbClearElems(a,f,l,t)	bzero(&(a)[f],((l)-(f)+1)*sizeof(t))
59382ff0afSmrg#define	_XkbFree(p)		free(p)
60382ff0afSmrg
61382ff0afSmrg	/*
62382ff0afSmrg	 * private values for key appearance flags
63382ff0afSmrg	 * must not conflict with values from XKBui.h
64382ff0afSmrg	 */
65382ff0afSmrg#define	XkbUI_Obscured		(1<<7)
66382ff0afSmrg
67382ff0afSmrg_XFUNCPROTOBEGIN
68382ff0afSmrg
69382ff0afSmrg_XFUNCPROTOEND
70382ff0afSmrg
71382ff0afSmrg#endif /* XKBUIPRIV_H */
72