"Fossies" - the Fresh Open Source Software Archive

Member "fltk-1.3.2/documentation/html/Xutf8_8h_source.html" (9 Dec 2012, 16589 Bytes) of package /linux/misc/fltk-1.3.2-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.2
Xutf8.h
00001 /* "$Id: Xutf8.h 8864 2011-07-19 04:49:30Z greg.ercolano $"
00002  *
00003  * Author: Jean-Marc Lienher ( http://oksid.ch )
00004  * Copyright 2000-2010 by O'ksi'D.
00005  *
00006  * This library is free software. Distribution and use rights are outlined in
00007  * the file "COPYING" which should have been included with this file.  If this
00008  * file is missing or damaged, see the license at:
00009  *
00010  *     http://www.fltk.org/COPYING.php
00011  *
00012  * Please report all bugs and problems on the following page:
00013  *
00014  *     http://www.fltk.org/str.php
00015  */
00016 
00017 #ifndef _Xutf8_h
00018 #define _Xutf8_h
00019 
00020 #  ifdef __cplusplus
00021 extern "C" {
00022 #  endif
00023 
00024 #include <X11/X.h>
00025 #include <X11/Xlib.h>
00026 #include <X11/Xlocale.h>
00027 #include <X11/Xutil.h>
00028 
00029 typedef struct {
00030         int nb_font;
00031         char **font_name_list;
00032         int *encodings;
00033         XFontStruct **fonts;
00034         Font fid;
00035         int ascent;
00036         int descent;
00037         int *ranges;
00038 } XUtf8FontStruct;
00039 
00040 XUtf8FontStruct *
00041 XCreateUtf8FontStruct (
00042         Display         *dpy,
00043         const char      *base_font_name_list);
00044 
00045 void
00046 XUtf8DrawString(
00047         Display                 *display,
00048         Drawable                d,
00049         XUtf8FontStruct  *font_set,
00050         GC                      gc,
00051         int                     x,
00052         int                     y,
00053         const char              *string,
00054         int                     num_bytes);
00055 
00056 void
00057 XUtf8_measure_extents(
00058         Display                 *display,
00059         Drawable                d,
00060         XUtf8FontStruct  *font_set,
00061         GC                      gc,
00062         int                     *xx,
00063         int                     *yy,
00064         int                     *ww,
00065         int                     *hh,
00066         const char              *string,
00067         int                     num_bytes);
00068 
00069 void
00070 XUtf8DrawRtlString(
00071         Display                 *display,
00072         Drawable                d,
00073         XUtf8FontStruct  *font_set,
00074         GC                      gc,
00075         int                     x,
00076         int                     y,
00077         const char              *string,
00078         int                     num_bytes);
00079 
00080 void
00081 XUtf8DrawImageString(
00082         Display         *display,
00083         Drawable        d,
00084         XUtf8FontStruct         *font_set,
00085         GC              gc,
00086         int             x,
00087         int             y,
00088         const char      *string,
00089         int             num_bytes);
00090 
00091 int
00092 XUtf8TextWidth(
00093         XUtf8FontStruct  *font_set,
00094         const char              *string,
00095         int                     num_bytes);
00096 int
00097 XUtf8UcsWidth(
00098         XUtf8FontStruct  *font_set,
00099         unsigned int            ucs);
00100 
00101 int
00102 XGetUtf8FontAndGlyph(
00103         XUtf8FontStruct  *font_set,
00104         unsigned int            ucs,
00105         XFontStruct     **fnt,
00106         unsigned short  *id);
00107 
00108 void
00109 XFreeUtf8FontStruct(
00110         Display                 *dpy,
00111         XUtf8FontStruct         *font_set);
00112 
00113 
00114 int
00115 XConvertUtf8ToUcs(
00116         const unsigned char     *buf,
00117         int                     len,
00118         unsigned int            *ucs);
00119 
00120 int
00121 XConvertUcsToUtf8(
00122         unsigned int            ucs,
00123         char                    *buf);
00124 
00125 int
00126 XUtf8CharByteLen(
00127         const unsigned char     *buf,
00128         int                     len);
00129 
00130 int
00131 XCountUtf8Char(
00132         const unsigned char *buf,
00133         int len);
00134 
00135 int
00136 XFastConvertUtf8ToUcs(
00137         const unsigned char     *buf,
00138         int                     len,
00139         unsigned int            *ucs);
00140 
00141 long
00142 XKeysymToUcs(
00143         KeySym  keysym);
00144 
00145 int
00146 XUtf8LookupString(
00147     XIC                 ic,
00148     XKeyPressedEvent*   event,
00149     char*               buffer_return,
00150     int                 bytes_buffer,
00151     KeySym*             keysym,
00152     Status*             status_return);
00153 
00154 unsigned short
00155 XUtf8IsNonSpacing(
00156         unsigned int ucs);
00157 
00158 unsigned short
00159 XUtf8IsRightToLeft(
00160         unsigned int ucs);
00161 
00162 
00163 int
00164 XUtf8Tolower(
00165         int ucs);
00166 
00167 int
00168 XUtf8Toupper(
00169         int ucs);
00170 
00171 
00172 #  ifdef __cplusplus
00173 }
00174 #  endif
00175 
00176 #endif
00177 
00178 /*
00179  *  End of "$Id: Xutf8.h 8864 2011-07-19 04:49:30Z greg.ercolano $".
00180  */