"Fossies" - the Fresh Open Source Software Archive

Member "fltk-1.3.3/documentation/html/Xutf8_8h_source.html" (3 Nov 2014, 27210 Bytes) of package /linux/misc/fltk-1.3.3-docs-html.tar.gz:


Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. Alternatively you can here view or download the uninterpreted raw source code. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

FLTK 1.3.3
Xutf8.h
1 /* "$Id: Xutf8.h 10248 2014-08-23 08:41:58Z cand $"
2  *
3  * Author: Jean-Marc Lienher ( http://oksid.ch )
4  * Copyright 2000-2010 by O'ksi'D.
5  *
6  * This library is free software. Distribution and use rights are outlined in
7  * the file "COPYING" which should have been included with this file. If this
8  * file is missing or damaged, see the license at:
9  *
10  * http://www.fltk.org/COPYING.php
11  *
12  * Please report all bugs and problems on the following page:
13  *
14  * http://www.fltk.org/str.php
15  */
16 
17 #if ! ( defined(_Xutf8_h) || defined(FL_DOXYGEN) )
18 #define _Xutf8_h
19 
20 # ifdef __cplusplus
21 extern "C" {
22 # endif
23 
24 #include <X11/X.h>
25 #include <X11/Xlib.h>
26 #include <X11/Xlocale.h>
27 #include <X11/Xutil.h>
28 
29 typedef struct {
30  int nb_font;
31  char **font_name_list;
32  int *encodings;
33  XFontStruct **fonts;
34  Font fid;
35  int ascent;
36  int descent;
37  int *ranges;
38 } XUtf8FontStruct;
39 
40 XUtf8FontStruct *
41 XCreateUtf8FontStruct (
42  Display *dpy,
43  const char *base_font_name_list);
44 
45 void
46 XUtf8DrawString(
47  Display *display,
48  Drawable d,
49  XUtf8FontStruct *font_set,
50  GC gc,
51  int x,
52  int y,
53  const char *string,
54  int num_bytes);
55 
56 void
57 XUtf8_measure_extents(
58  Display *display,
59  Drawable d,
60  XUtf8FontStruct *font_set,
61  GC gc,
62  int *xx,
63  int *yy,
64  int *ww,
65  int *hh,
66  const char *string,
67  int num_bytes);
68 
69 void
70 XUtf8DrawRtlString(
71  Display *display,
72  Drawable d,
73  XUtf8FontStruct *font_set,
74  GC gc,
75  int x,
76  int y,
77  const char *string,
78  int num_bytes);
79 
80 void
81 XUtf8DrawImageString(
82  Display *display,
83  Drawable d,
84  XUtf8FontStruct *font_set,
85  GC gc,
86  int x,
87  int y,
88  const char *string,
89  int num_bytes);
90 
91 int
92 XUtf8TextWidth(
93  XUtf8FontStruct *font_set,
94  const char *string,
95  int num_bytes);
96 int
97 XUtf8UcsWidth(
98  XUtf8FontStruct *font_set,
99  unsigned int ucs);
100 
101 int
102 XGetUtf8FontAndGlyph(
103  XUtf8FontStruct *font_set,
104  unsigned int ucs,
105  XFontStruct **fnt,
106  unsigned short *id);
107 
108 void
109 XFreeUtf8FontStruct(
110  Display *dpy,
111  XUtf8FontStruct *font_set);
112 
113 
114 int
115 XConvertUtf8ToUcs(
116  const unsigned char *buf,
117  int len,
118  unsigned int *ucs);
119 
120 int
121 XConvertUcsToUtf8(
122  unsigned int ucs,
123  char *buf);
124 
125 int
126 XUtf8CharByteLen(
127  const unsigned char *buf,
128  int len);
129 
130 int
131 XCountUtf8Char(
132  const unsigned char *buf,
133  int len);
134 
135 int
136 XFastConvertUtf8ToUcs(
137  const unsigned char *buf,
138  int len,
139  unsigned int *ucs);
140 
141 long
142 XKeysymToUcs(
143  KeySym keysym);
144 
145 #ifdef X_HAVE_UTF8_STRING
146 #define XUtf8LookupString Xutf8LookupString
147 #else
148 int
149 XUtf8LookupString(
150  XIC ic,
151  XKeyPressedEvent* event,
152  char* buffer_return,
153  int bytes_buffer,
154  KeySym* keysym,
155  Status* status_return);
156 #endif
157 
158 unsigned short
159 XUtf8IsNonSpacing(
160  unsigned int ucs);
161 
162 unsigned short
163 XUtf8IsRightToLeft(
164  unsigned int ucs);
165 
166 
167 int
168 XUtf8Tolower(
169  int ucs);
170 
171 int
172 XUtf8Toupper(
173  int ucs);
174 
175 
176 # ifdef __cplusplus
177 }
178 # endif
179 
180 #endif
181 
182 /*
183  * End of "$Id: Xutf8.h 10248 2014-08-23 08:41:58Z cand $".
184  */