1/* 2 * Copyright (c) 1992, Oracle and/or its affiliates. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the 9 * Software is furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice (including the next 12 * paragraph) shall be included in all copies or substantial portions of the 13 * Software. 14 * 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 * DEALINGS IN THE SOFTWARE. 22 */ 23/****************************************************************** 24 25 Copyright 1992, 1993, 1994 by FUJITSU LIMITED 26 27Permission to use, copy, modify, distribute, and sell this software 28and its documentation for any purpose is hereby granted without fee, 29provided that the above copyright notice appear in all copies and 30that both that copyright notice and this permission notice appear 31in supporting documentation, and that the name of FUJITSU LIMITED 32not be used in advertising or publicity pertaining to distribution 33of the software without specific, written prior permission. 34FUJITSU LIMITED makes no representations about the suitability of 35this software for any purpose. 36It is provided "as is" without express or implied warranty. 37 38FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 39INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 40EVENT SHALL FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT OR 41CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF 42USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 43OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 44PERFORMANCE OF THIS SOFTWARE. 45 46 Author: Hideki Hiura (hhiura@Sun.COM) Sun Microsystems, Inc. 47 Takashi Fujiwara FUJITSU LIMITED 48 fujiwara@a80.tech.yk.fujitsu.co.jp 49 50******************************************************************/ 51 52#ifndef _XIMTRANS_H 53#define _XIMTRANS_H 54 55typedef struct _TransIntrCallbackRec *TransIntrCallbackPtr; 56 57typedef struct _TransIntrCallbackRec { 58 Bool (*func)( 59 Xim, INT16, XPointer, XPointer 60 ); 61 XPointer call_data; 62 TransIntrCallbackPtr next; 63} TransIntrCallbackRec ; 64 65typedef struct { 66 TransIntrCallbackPtr intr_cb; 67 struct _XtransConnInfo *trans_conn; /* transport connection object */ 68 int fd; 69 char *address; 70 Window window; 71 Bool is_putback; 72} TransSpecRec; 73 74 75/* 76 * Prototypes 77 */ 78 79extern Bool _XimTransRegisterDispatcher( 80 Xim im, 81 Bool (*callback)( 82 Xim, INT16, XPointer, XPointer 83 ), 84 XPointer call_data 85); 86 87 88extern Bool _XimTransIntrCallback( 89 Xim im, 90 Bool (*callback)( 91 Xim, INT16, XPointer, XPointer 92 ), 93 XPointer call_data 94); 95 96extern Bool _XimTransCallDispatcher( 97 Xim im, 98 INT16 len, 99 XPointer data 100); 101 102extern void _XimFreeTransIntrCallback( 103 Xim im 104); 105 106extern Bool _XimTransFilterWaitEvent( 107 Display *d, 108 Window w, 109 XEvent *ev, 110 XPointer arg 111); 112 113extern void _XimTransInternalConnection( 114 Display *d, 115 int fd, 116 XPointer arg 117); 118 119extern Bool _XimTransWrite( 120 Xim im, 121 INT16 len, 122 XPointer data 123); 124 125extern Bool _XimTransRead( 126 Xim im, 127 XPointer recv_buf, 128 int buf_len, 129 int *ret_len 130); 131 132extern void _XimTransFlush( 133 Xim im 134); 135 136#endif /* _XIMTRANS__H */ 137