FLTK 1.4.4
Toggle main menu visibility
Loading...
Searching...
No Matches
Xutf8.h
1
/*
2
* Author: Jean-Marc Lienher ( http://oksid.ch )
3
* Copyright 2000-2010 by O'ksi'D.
4
*
5
* This library is free software. Distribution and use rights are outlined in
6
* the file "COPYING" which should have been included with this file. If this
7
* file is missing or damaged, see the license at:
8
*
9
* https://www.fltk.org/COPYING.php
10
*
11
* Please see the following page on how to report bugs and issues:
12
*
13
* https://www.fltk.org/bugs.php
14
*/
15
16
#if ! ( defined(_Xutf8_h) || defined(FL_DOXYGEN) )
17
#define _Xutf8_h
18
19
# ifdef __cplusplus
20
extern
"C"
{
21
# endif
22
23
#include <X11/X.h>
24
#include <X11/Xlib.h>
25
#include <X11/Xlocale.h>
26
#include <X11/Xutil.h>
27
#include <FL/Fl_Export.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
FL_EXPORT
int
102
fl_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
# ifdef __cplusplus
159
}
160
# endif
161
162
#endif
src
Xutf8.h
Generated by
1.17.0