Debian Codegraph @

nx-X11/lib/src/xlibi18n/XimTrans.h

raw
1 /*
2 * Copyright 1992 Oracle and/or its affiliates. All rights reserved.
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
27 Permission to use, copy, modify, distribute, and sell this software
28 and its documentation for any purpose is hereby granted without fee,
29 provided that the above copyright notice appear in all copies and
30 that both that copyright notice and this permission notice appear
31 in supporting documentation, and that the name of FUJITSU LIMITED
32 not be used in advertising or publicity pertaining to distribution
33 of the software without specific, written prior permission.
34 FUJITSU LIMITED makes no representations about the suitability of
35 this software for any purpose.
36 It is provided "as is" without express or implied warranty.
37
38 FUJITSU LIMITED DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
39 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
40 EVENT SHALL FUJITSU LIMITED BE LIABLE FOR ANY SPECIAL, INDIRECT OR
41 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
42 USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
44 PERFORMANCE OF THIS SOFTWARE.
45
46 Author: Hideki Hiura ([email protected]) Sun Microsystems, Inc.
47 Takashi Fujiwara FUJITSU LIMITED
48 [email protected]
49
50 ******************************************************************/
51
52 #ifndef _XIMTRANS_H
53 #define _XIMTRANS_H
54
55 typedef struct _TransIntrCallbackRec *TransIntrCallbackPtr;
56
57 typedef struct _TransIntrCallbackRec {
58 Bool (*func)(
59 Xim, INT16, XPointer, XPointer
60 );
61 XPointer call_data;
62 TransIntrCallbackPtr next;
63 } TransIntrCallbackRec ;
64
65 typedef 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
79 extern Bool _XimTransRegisterDispatcher(
80 Xim im,
81 Bool (*callback)(
82 Xim, INT16, XPointer, XPointer
83 ),
84 XPointer call_data
85 );
86
87
88 extern Bool _XimTransIntrCallback(
89 Xim im,
90 Bool (*callback)(
91 Xim, INT16, XPointer, XPointer
92 ),
93 XPointer call_data
94 );
95
96 extern Bool _XimTransCallDispatcher(
97 Xim im,
98 INT16 len,
99 XPointer data
100 );
101
102 extern void _XimFreeTransIntrCallback(
103 Xim im
104 );
105
106 extern Bool _XimTransFilterWaitEvent(
107 Display *d,
108 Window w,
109 XEvent *ev,
110 XPointer arg
111 );
112
113 extern void _XimTransInternalConnection(
114 Display *d,
115 int fd,
116 XPointer arg
117 );
118
119 extern Bool _XimTransWrite(
120 Xim im,
121 INT16 len,
122 XPointer data
123 );
124
125 extern Bool _XimTransRead(
126 Xim im,
127 XPointer recv_buf,
128 int buf_len,
129 int *ret_len
130 );
131
132 extern void _XimTransFlush(
133 Xim im
134 );
135
136 #endif /* _XIMTRANS__H */