Chapter 13. Examples of I18N
109
Though it is possible to solve the first problem, this problem may make the wrapper very com 
plex. Thus, I decided to modify the original source and leave the wrapper simple, instead of
writing a complete wrapper. However, if
XGCValues.font
is set and
XCreateGC()
is called, it
is needed to avoid
XCreateGC
to fail because of null font specification. Thus I wrote a wrapper
of
XCreateGC
.
To solve the second problem, I wrote a wrapper of
XFontSet
which has structure members of
ascent
and
descent
. Thus all wrapper functions are related to this wrapper structure.
To solve the third problem, I wrote a wrapper of
XCreateFontSet()
. This part can be used for
many X clients which are already internationalized using fontset related functions, because these
softwares have the same problem. Explanation on this problem and solution will be supplied in
other section.
13.4.3 Usage of the wrapper
Replace the following structure and functions. You can use replacement faculty of your text editor.
  XFontStruct  > QuasiXFontStruct
  XLoadQueryFont()  > QuasiXLoadQueryFont()
  XFreeFont()  > QuasiXFreeFont()
  XTextExtents()  > QuasiXTextExtents()
  XTextWidth()  > QuasiXTextWidth()
  XGetWMIconName()  > QuasiXGetWMIconName()
  XGetWMName()  > QuasiXGetWMName()
  XFetchName()  > QuasiXFetchName()
  XGetIconName()  > QuasiXGetIconName()
  XChangeGC()  > QuasiXChangeGC()
  XCreateGC()  > QuasiXCreateGC()
The following two wrapper functions need an additional parameter.
  XDrawString(Display *d, Window w, GC gc, int x, int y, const char *string, int len)  > QuasiX 
DrawString(Display *d, Window w, QuasiXFontStruct *q, GC gc, int x, int y, char *string, int
len)






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

indiana web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved