fltk 1.3.0rc3
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X. Release candidate.
  SfR Fresh Dox: fltk-1.3.0rc3-source.tar.gz ("inofficial" and yet experimental doxygen-generated source code documentation)  

Xutf8.h File Reference

#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xlocale.h>
#include <X11/Xutil.h>
Include dependency graph for Xutf8.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  XUtf8FontStruct

Functions

XUtf8FontStructXCreateUtf8FontStruct (Display *dpy, const char *base_font_name_list)
void XUtf8DrawString (Display *display, Drawable d, XUtf8FontStruct *font_set, GC gc, int x, int y, const char *string, int num_bytes)
void XUtf8DrawRtlString (Display *display, Drawable d, XUtf8FontStruct *font_set, GC gc, int x, int y, const char *string, int num_bytes)
void XUtf8DrawImageString (Display *display, Drawable d, XUtf8FontStruct *font_set, GC gc, int x, int y, const char *string, int num_bytes)
int XUtf8TextWidth (XUtf8FontStruct *font_set, const char *string, int num_bytes)
int XUtf8UcsWidth (XUtf8FontStruct *font_set, unsigned int ucs)
int XGetUtf8FontAndGlyph (XUtf8FontStruct *font_set, unsigned int ucs, XFontStruct **fnt, unsigned short *id)
void XFreeUtf8FontStruct (Display *dpy, XUtf8FontStruct *font_set)
int XConvertUtf8ToUcs (const unsigned char *buf, int len, unsigned int *ucs)
int XConvertUcsToUtf8 (unsigned int ucs, char *buf)
int XUtf8CharByteLen (const unsigned char *buf, int len)
int XCountUtf8Char (const unsigned char *buf, int len)
int XFastConvertUtf8ToUcs (const unsigned char *buf, int len, unsigned int *ucs)
long XKeysymToUcs (KeySym keysym)
int XUtf8LookupString (XIC ic, XKeyPressedEvent *event, char *buffer_return, int bytes_buffer, KeySym *keysym, Status *status_return)
unsigned short XUtf8IsNonSpacing (unsigned int ucs)
unsigned short XUtf8IsRightToLeft (unsigned int ucs)
int XUtf8Tolower (int ucs)
int XUtf8Toupper (int ucs)

Function Documentation

int XConvertUcsToUtf8 ( unsigned int  ucs,
char *  buf 
)
int XConvertUtf8ToUcs ( const unsigned char *  buf,
int  len,
unsigned int *  ucs 
)

Definition at line 42 of file utf8Utils.c.

References int.

Referenced by XUtf8CharByteLen().

int XCountUtf8Char ( const unsigned char *  buf,
int  len 
)

Definition at line 160 of file utf8Utils.c.

References i, and XUtf8CharByteLen().

XUtf8FontStruct* XCreateUtf8FontStruct ( Display *  dpy,
const char *  base_font_name_list 
)

Creates an array of XFontStruct acording to the comma separated list of fonts. XLoad all fonts.

Definition at line 308 of file utf8Wrap.c.

References XUtf8FontStruct::font_name_list, XUtf8FontStruct::nb_font, and NULL.

Referenced by main().

int XFastConvertUtf8ToUcs ( const unsigned char *  buf,
int  len,
unsigned int *  ucs 
)

Definition at line 178 of file utf8Utils.c.

References int.

Referenced by XUtf8DrawRtlString(), XUtf8DrawString(), and XUtf8TextWidth().

void XFreeUtf8FontStruct ( Display *  dpy,
XUtf8FontStruct font_set 
)

free the XFontSet and others things created by XCreateUtf8FontSet

Definition at line 881 of file utf8Wrap.c.

References XUtf8FontStruct::encodings, XUtf8FontStruct::font_name_list, XUtf8FontStruct::fonts, i, and XUtf8FontStruct::ranges.

Referenced by main().

int XGetUtf8FontAndGlyph ( XUtf8FontStruct font_set,
unsigned int  ucs,
XFontStruct **  fnt,
unsigned short *  id 
)

get the X font and glyph ID of a UCS char

Definition at line 682 of file utf8Wrap.c.

References XUtf8FontStruct::encodings, encodings, XUtf8FontStruct::fonts, i, XUtf8FontStruct::nb_font, XUtf8FontStruct::ranges, ucs2fontmap(), and x.

long XKeysymToUcs ( KeySym  keysym)

Definition at line 33 of file keysym2Ucs.c.

References KeySymToUcs4().

Referenced by fl_handle(), and XUtf8LookupString().

int XUtf8CharByteLen ( const unsigned char *  buf,
int  len 
)

Definition at line 150 of file utf8Utils.c.

References XConvertUtf8ToUcs().

Referenced by XCountUtf8Char().

void XUtf8DrawImageString ( Display *  display,
Drawable  d,
XUtf8FontStruct font_set,
GC  gc,
int  x,
int  y,
const char *  string,
int  num_bytes 
)

draw an UTF-8 string and clear the background.

Definition at line 828 of file utf8Wrap.c.

References XUtf8FontStruct::ascent, background, XUtf8FontStruct::descent, w, XUtf8DrawString(), and XUtf8TextWidth().

Referenced by main().

void XUtf8DrawRtlString ( Display *  display,
Drawable  d,
XUtf8FontStruct font_set,
GC  gc,
int  x,
int  y,
const char *  string,
int  num_bytes 
)

draw a Right To Left UTF-8 string using multiple fonts as needed.

Definition at line 337 of file utf8Wrap.c.

References buf, XUtf8FontStruct::encodings, encodings, XUtf8FontStruct::fonts, i, XUtf8FontStruct::nb_font, ptr, XUtf8FontStruct::ranges, ucs2fontmap(), XFastConvertUtf8ToUcs(), and XUtf8IsNonSpacing().

Referenced by main(), and Fl_Xlib_Graphics_Driver::rtl_draw().

void XUtf8DrawString ( Display *  display,
Drawable  d,
XUtf8FontStruct font_set,
GC  gc,
int  x,
int  y,
const char *  string,
int  num_bytes 
)
unsigned short XUtf8IsNonSpacing ( unsigned int  ucs)
unsigned short XUtf8IsRightToLeft ( unsigned int  ucs)

Definition at line 31 of file is_right2left.c.

int XUtf8LookupString ( XIC  ic,
XKeyPressedEvent *  event,
char *  buffer_return,
int  bytes_buffer,
KeySym *  keysym,
Status *  status_return 
)

Definition at line 414 of file utf8Input.c.

References XConvertEucToUtf8(), XConvertUcsToUtf8(), and XKeysymToUcs().

Referenced by fl_handle(), and main().

int XUtf8TextWidth ( XUtf8FontStruct font_set,
const char *  string,
int  num_bytes 
)
int XUtf8Tolower ( int  ucs)

Definition at line 35 of file case.c.

Referenced by fl_tolower(), fl_utf_strncasecmp(), fl_utf_tolower(), main(), and XUtf8Toupper().

int XUtf8Toupper ( int  ucs)

Definition at line 105 of file case.c.

References i, NULL, and XUtf8Tolower().

int XUtf8UcsWidth ( XUtf8FontStruct font_set,
unsigned int  ucs 
)

returns the pixel width of a UCS char

Definition at line 753 of file utf8Wrap.c.

References buf, XUtf8FontStruct::encodings, encodings, XUtf8FontStruct::fonts, i, XUtf8FontStruct::nb_font, XUtf8FontStruct::ranges, ucs2fontmap(), x, and XUtf8IsNonSpacing().

Referenced by fl_width().