XimTrans.h revision 61b2299d
1/* $Xorg: XimTrans.h,v 1.3 2000/08/17 19:45:05 cpqbld Exp $ */ 2/****************************************************************** 3 4 Copyright 1992 by Sun Microsystems, Inc. 5 Copyright 1992, 1993, 1994 by FUJITSU LIMITED 6 7Permission to use, copy, modify, distribute, and sell this software 8and its documentation for any purpose is hereby granted without fee, 9provided that the above copyright notice appear in all copies and 10that both that copyright notice and this permission notice appear 11in supporting documentation, and that the name of Sun Microsystems, Inc. 12and FUJITSU LIMITED not be used in advertising or publicity pertaining to 13distribution of the software without specific, written prior permission. 14Sun Microsystems, Inc. and FUJITSU LIMITED makes no representations about 15the suitability of this software for any purpose. 16It is provided "as is" without express or implied warranty. 17 18Sun Microsystems Inc. AND FUJITSU LIMITED DISCLAIMS ALL WARRANTIES WITH 19REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 20AND FITNESS, IN NO EVENT SHALL Sun Microsystems, Inc. AND FUJITSU LIMITED 21BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 22WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 23ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 24IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 25 26 Author: Hideki Hiura (hhiura@Sun.COM) Sun Microsystems, Inc. 27 Takashi Fujiwara FUJITSU LIMITED 28 fujiwara@a80.tech.yk.fujitsu.co.jp 29 30******************************************************************/ 31/* $XFree86: xc/lib/X11/XimTrans.h,v 1.3 2003/10/24 15:34:00 tsi Exp $ */ 32 33#ifndef _XIMTRANS_H 34#define _XIMTRANS_H 35 36typedef struct _TransIntrCallbackRec *TransIntrCallbackPtr; 37 38typedef struct _TransIntrCallbackRec { 39 Bool (*func)( 40 Xim, INT16, XPointer, XPointer 41 ); 42 XPointer call_data; 43 TransIntrCallbackPtr next; 44} TransIntrCallbackRec ; 45 46typedef struct { 47 TransIntrCallbackPtr intr_cb; 48 struct _XtransConnInfo *trans_conn; /* transport connection object */ 49 int fd; 50 char *address; 51 Window window; 52 Bool is_putback; 53} TransSpecRec; 54 55 56/* 57 * Prototypes 58 */ 59 60extern Bool _XimTransRegisterDispatcher( 61 Xim im, 62 Bool (*callback)( 63 Xim, INT16, XPointer, XPointer 64 ), 65 XPointer call_data 66); 67 68 69extern Bool _XimTransIntrCallback( 70 Xim im, 71 Bool (*callback)( 72 Xim, INT16, XPointer, XPointer 73 ), 74 XPointer call_data 75); 76 77extern Bool _XimTransCallDispatcher( 78 Xim im, 79 INT16 len, 80 XPointer data 81); 82 83extern void _XimFreeTransIntrCallback( 84 Xim im 85); 86 87extern Bool _XimTransFilterWaitEvent( 88 Display *d, 89 Window w, 90 XEvent *ev, 91 XPointer arg 92); 93 94extern void _XimTransInternalConnection( 95 Display *d, 96 int fd, 97 XPointer arg 98); 99 100extern Bool _XimTransWrite( 101 Xim im, 102 INT16 len, 103 XPointer data 104); 105 106extern Bool _XimTransRead( 107 Xim im, 108 XPointer recv_buf, 109 int buf_len, 110 int *ret_len 111); 112 113extern void _XimTransFlush( 114 Xim im 115); 116 117#endif /* _XIMTRANS__H */ 118