From 3562e78743202e43aec8727005182a2558117eca Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 28 Jun 2009 22:07:26 +0000 Subject: Checked in the following released items: xkeyboard-config-1.4.tar.gz ttf-bitstream-vera-1.10.tar.gz font-alias-1.0.1.tar.gz font-sun-misc-1.0.0.tar.gz font-sun-misc-1.0.0.tar.gz font-sony-misc-1.0.0.tar.gz font-schumacher-misc-1.0.0.tar.gz font-mutt-misc-1.0.0.tar.gz font-misc-misc-1.0.0.tar.gz font-misc-meltho-1.0.0.tar.gz font-micro-misc-1.0.0.tar.gz font-jis-misc-1.0.0.tar.gz font-isas-misc-1.0.0.tar.gz font-dec-misc-1.0.0.tar.gz font-daewoo-misc-1.0.0.tar.gz font-cursor-misc-1.0.0.tar.gz font-arabic-misc-1.0.0.tar.gz font-winitzki-cyrillic-1.0.0.tar.gz font-misc-cyrillic-1.0.0.tar.gz font-cronyx-cyrillic-1.0.0.tar.gz font-screen-cyrillic-1.0.1.tar.gz font-xfree86-type1-1.0.1.tar.gz font-adobe-utopia-type1-1.0.1.tar.gz font-ibm-type1-1.0.0.tar.gz font-bitstream-type1-1.0.0.tar.gz font-bitstream-speedo-1.0.0.tar.gz font-bh-ttf-1.0.0.tar.gz font-bh-type1-1.0.0.tar.gz font-bitstream-100dpi-1.0.0.tar.gz font-bh-lucidatypewriter-100dpi-1.0.0.tar.gz font-bh-100dpi-1.0.0.tar.gz font-adobe-utopia-100dpi-1.0.1.tar.gz font-adobe-100dpi-1.0.0.tar.gz font-util-1.0.1.tar.gz font-bitstream-75dpi-1.0.0.tar.gz font-bh-lucidatypewriter-75dpi-1.0.0.tar.gz font-adobe-utopia-75dpi-1.0.1.tar.gz font-bh-75dpi-1.0.0.tar.gz bdftopcf-1.0.1.tar.gz font-adobe-75dpi-1.0.0.tar.gz mkfontscale-1.0.6.tar.gz openssl-0.9.8k.tar.gz bigreqsproto-1.0.2.tar.gz xtrans-1.2.2.tar.gz resourceproto-1.0.2.tar.gz inputproto-1.4.4.tar.gz compositeproto-0.4.tar.gz damageproto-1.1.0.tar.gz zlib-1.2.3.tar.gz xkbcomp-1.0.5.tar.gz freetype-2.3.9.tar.gz pthreads-w32-2-8-0-release.tar.gz pixman-0.12.0.tar.gz kbproto-1.0.3.tar.gz evieext-1.0.2.tar.gz fixesproto-4.0.tar.gz recordproto-1.13.2.tar.gz randrproto-1.2.2.tar.gz scrnsaverproto-1.1.0.tar.gz renderproto-0.9.3.tar.gz xcmiscproto-1.1.2.tar.gz fontsproto-2.0.2.tar.gz xextproto-7.0.3.tar.gz xproto-7.0.14.tar.gz libXdmcp-1.0.2.tar.gz libxkbfile-1.0.5.tar.gz libfontenc-1.0.4.tar.gz libXfont-1.3.4.tar.gz libX11-1.1.5.tar.gz libXau-1.0.4.tar.gz libxcb-1.1.tar.gz xorg-server-1.5.3.tar.gz --- libX11/src/xkb/XKBlibint.h | 345 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 345 insertions(+) create mode 100644 libX11/src/xkb/XKBlibint.h (limited to 'libX11/src/xkb/XKBlibint.h') diff --git a/libX11/src/xkb/XKBlibint.h b/libX11/src/xkb/XKBlibint.h new file mode 100644 index 000000000..ededdaa72 --- /dev/null +++ b/libX11/src/xkb/XKBlibint.h @@ -0,0 +1,345 @@ +/* $Xorg: XKBlibint.h,v 1.3 2000/08/17 19:45:04 cpqbld Exp $ */ +/************************************************************ +Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright +notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting +documentation, and that the name of Silicon Graphics not be +used in advertising or publicity pertaining to distribution +of the software without specific prior written permission. +Silicon Graphics makes no representation about the suitability +of this software for any purpose. It is provided "as is" +without any express or implied warranty. + +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL +DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH +THE USE OR PERFORMANCE OF THIS SOFTWARE. + +********************************************************/ +/* $XFree86: xc/lib/X11/XKBlibint.h,v 3.5 2003/04/18 18:21:45 torrey Exp $ */ + +#ifndef _XKBLIBINT_H_ +#define _XKBLIBINT_H_ + +#include +#include + +#define XkbMapPending (1<<0) +#define XkbXlibNewKeyboard (1<<1) + +typedef int (*XkbKSToMBFunc)( + XPointer /* priv */, + KeySym /* sym */, + char * /* buf */, + int /* len */, + int * /* extra_rtrn */ +); + +typedef KeySym (*XkbMBToKSFunc)( + XPointer /* priv */, + char * /* buf */, + int /* len */, + Status * /* status */ +); + +typedef KeySym (*XkbToUpperFunc)( + KeySym /* sym */ +); + +typedef struct _XkbConverters { + XkbKSToMBFunc KSToMB; + XPointer KSToMBPriv; + XkbMBToKSFunc MBToKS; + XPointer MBToKSPriv; + XkbToUpperFunc KSToUpper; +} XkbConverters; + +extern XkbInternAtomFunc _XkbInternAtomFunc; +extern XkbGetAtomNameFunc _XkbGetAtomNameFunc; + +typedef struct _XkbInfoRec { + unsigned flags; + unsigned xlib_ctrls; + XExtCodes *codes; + int srv_major; + int srv_minor; + unsigned selected_events; + unsigned short selected_nkn_details; + unsigned short selected_map_details; + XkbDescRec *desc; + XkbMapChangesRec changes; + Atom composeLED; + XkbConverters cvt; + XkbConverters latin1cvt; +} XkbInfoRec, *XkbInfoPtr; + + +#define _XkbUnavailable(d) \ + (((d)->flags&XlibDisplayNoXkb) ||\ + ((!(d)->xkb_info || (!(d)->xkb_info->desc)) && !_XkbLoadDpy(d))) + +#define _XkbCheckPendingRefresh(d,xi) {\ + if ((xi)->flags&XkbXlibNewKeyboard)\ + _XkbReloadDpy((d));\ + else if ((xi)->flags&XkbMapPending) {\ + if (XkbGetMapChanges((d),(xi)->desc, &(xi)->changes)==Success) {\ + LockDisplay((d));\ + (xi)->changes.changed= 0;\ + UnlockDisplay((d));\ + }\ + }\ +} + +#define _XkbNeedModmap(i) ((!(i)->desc->map)||(!(i)->desc->map->modmap)) + + /* + * mask of the events that the "invisible" XKB support in Xlib needs + */ +#define XKB_XLIB_MAP_MASK (XkbAllClientInfoMask) + + /* + * Handy helper macros + */ +#define XKB_INSURE_SIZE(f,t,nNum,oNum) {\ + if ((f)==NULL) \ + (f)=(t *)Xmalloc(sizeof(t)*(nNum));\ + else if ((nNum)<(oNum))\ + (f)=(t *)Xrealloc((f),sizeof(t)*(nNum));\ + } + +typedef struct _XkbReadBuffer { + int error; + int size; + char *start; + char *data; +} XkbReadBufferRec,*XkbReadBufferPtr; + +#define _XkbAlloc(s) Xmalloc((s)) +#define _XkbCalloc(n,s) Xcalloc((n),(s)) +#define _XkbRealloc(o,s) Xrealloc((o),(s)) +#define _XkbTypedAlloc(t) ((t *)Xmalloc(sizeof(t))) +#define _XkbTypedCalloc(n,t) ((t *)Xcalloc((n),sizeof(t))) +#define _XkbTypedRealloc(o,n,t) \ + ((o)?(t *)Xrealloc((o),(n)*sizeof(t)):_XkbTypedCalloc(n,t)) +#define _XkbClearElems(a,f,l,t) bzero(&(a)[f],((l)-(f)+1)*sizeof(t)) +#define _XkbFree(p) Xfree(p) + +_XFUNCPROTOBEGIN + +extern void _XkbReloadDpy( + Display * /* dpy */ +); + +extern KeySym _XKeycodeToKeysym( + Display* /* display */, +#if NeedWidePrototypes + unsigned int /* keycode */, +#else + KeyCode /* keycode */, +#endif + int /* index */ +); + +extern KeyCode _XKeysymToKeycode( + Display* /* display */, + KeySym /* keysym */ +); + +extern KeySym _XLookupKeysym( + XKeyEvent* /* key_event */, + int /* index */ +); + +extern int _XRefreshKeyboardMapping( + XMappingEvent* /* event_map */ +); + +extern unsigned _XKeysymToModifiers( + Display * /* dpy */, + KeySym /* ks */ +); + +extern int _XTranslateKey( + register Display * /* dpy */, + KeyCode /* keycode */, + register unsigned int /* modifiers */, + unsigned int * /* modifiers_return */, + KeySym * /* keysym_return */ +); + +extern int _XTranslateKeySym( + Display * /* dpy */, + register KeySym /* symbol */, + unsigned int /* modifiers */, + char * /* buffer */, + int /* nbytes */ +); + +extern int _XLookupString( + register XKeyEvent * /* event */, + char * /* buffer */, + int /* nbytes */, + KeySym * /* keysym */, + XComposeStatus * /* status */ +); + +extern void _XkbNoteCoreMapChanges( + XkbMapChangesRec * /* old */, + XMappingEvent * /* new */, + unsigned int /* wanted */ +); + +extern int _XkbInitReadBuffer( + Display * /* dpy */, + XkbReadBufferPtr /* buf */, + int /* size */ +); + +extern int _XkbSkipReadBufferData( + XkbReadBufferPtr /* from */, + int /* size */ +); + +extern int _XkbCopyFromReadBuffer( + XkbReadBufferPtr /* from */, + char * /* to */, + int /* size */ +); + + +#if defined(WORD64) || defined(LONG64) +extern int _XkbReadCopyData32( + int * /* from */, + long * /* to */, + int /* num_words */ +); + +extern int _XkbWriteCopyData32( + unsigned long * /* from */, + CARD32 * /* to */, + int /* num_words */ +); + +extern int _XkbReadBufferCopy32( + XkbReadBufferPtr /* from */, + long * /* to */, + int /* size */ +); +#else +#define _XkbReadCopyData32(f,t,s) memcpy((char *)(t),(char *)(f),(s)*4) +#define _XkbWriteCopyData32(f,t,s) memcpy((char *)(t),(char *)(f),(s)*4) +#define _XkbReadBufferCopy32(f,t,s) _XkbCopyFromReadBuffer(f,(char *)t,(s)*4) +#endif + +#ifndef NO_DEC_BINARY_COMPATIBILITY +#define XKB_FORCE_INT_KEYSYM 1 +#endif + +#ifdef XKB_FORCE_INT_KEYSYM +extern int _XkbReadCopyKeySyms( + int * /* from */, + KeySym * /* to */, + int /* num_words */ +); + +extern int _XkbWriteCopyKeySyms( + KeySym * /* from */, + CARD32 * /* to */, + int /* num_words */ +); + +extern int _XkbReadBufferCopyKeySyms( + XkbReadBufferPtr /* from */, +#ifndef NO_DEC_BUG_FIX + KeySym * /* to */, +#else + long * /* to */, +#endif + int /* size */ +); +#else +#define _XkbReadCopyKeySyms(f,t,n) _XkbReadCopyData32(f,t,n) +#define _XkbWriteCopyKeySyms(f,t,n) _XkbWriteCopyData32(f,t,n) +#define _XkbReadBufferCopyKeySyms(f,t,s) _XkbReadBufferCopy32(f,t,s) +#endif + +extern char *_XkbPeekAtReadBuffer( + XkbReadBufferPtr /* from */, + int /* size */ +); + +extern char *_XkbGetReadBufferPtr( + XkbReadBufferPtr /* from */, + int /* size */ +); +#define _XkbGetTypedRdBufPtr(b,n,t) ((t *)_XkbGetReadBufferPtr(b,(n)*SIZEOF(t))) + +extern int _XkbFreeReadBuffer( + XkbReadBufferPtr /* buf */ +); + +extern Bool +_XkbGetReadBufferCountedString( + XkbReadBufferPtr /* buf */, + char ** /* rtrn */ +); + +extern char *_XkbGetCharset( + void +); + +extern int _XkbGetConverters( + const char * /* encoding_name */, + XkbConverters * /* cvt_rtrn */ +); + +#ifdef NEED_MAP_READERS + +extern Status _XkbReadGetMapReply( + Display * /* dpy */, + xkbGetMapReply * /* rep */, + XkbDescRec * /* xkb */, + int * /* nread_rtrn */ +); + +extern Status _XkbReadGetCompatMapReply( + Display * /* dpy */, + xkbGetCompatMapReply * /* rep */, + XkbDescPtr /* xkb */, + int * /* nread_rtrn */ +); + +extern Status _XkbReadGetIndicatorMapReply( + Display * /* dpy */, + xkbGetIndicatorMapReply * /* rep */, + XkbDescPtr /* xkb */, + int * /* nread_rtrn */ +); + +extern Status _XkbReadGetNamesReply( + Display * /* dpy */, + xkbGetNamesReply * /* rep */, + XkbDescPtr /* xkb */, + int * /* nread_rtrn */ +); + +extern Status _XkbReadGetGeometryReply( + Display * /* dpy */, + xkbGetGeometryReply * /* rep */, + XkbDescPtr /* xkb */, + int * /* nread_rtrn */ +); + +#endif + +_XFUNCPROTOEND + +#endif /* _XKBLIBINT_H_ */ -- cgit v1.2.3