comparison include/XWStr.h @ 0:92745d501b9a

initial import from kinput2-v3.1
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Mon, 08 Mar 2010 04:44:30 +0900
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:92745d501b9a
1 /*
2 * XWStr.h -- header file for X Wide-Character String Library
3 */
4
5 /*
6 * Copyright (c) 1989 Software Research Associates, Inc.
7 *
8 * Permission to use, copy, modify, and distribute this software and its
9 * documentation for any purpose and without fee is hereby granted, provided
10 * that the above copyright notice appear in all copies and that both that
11 * copyright notice and this permission notice appear in supporting
12 * documentation, and that the name of Software Research Associates not be
13 * used in advertising or publicity pertaining to distribution of the
14 * software without specific, written prior permission. Software Research
15 * Associates makes no representations about the suitability of this software
16 * for any purpose. It is provided "as is" without express or implied
17 * warranty.
18 *
19 * Author: Makoto Ishisone, Software Research Associates, Inc., Japan
20 * ishisone@sra.co.jp
21 */
22
23 /* $Id: XWStr.h,v 2.2 1991/09/23 05:33:08 ishisone Rel $ */
24
25 #ifndef _XWStr_h
26 #define _XWStr_h
27
28 #include "WStr.h"
29
30 typedef struct {
31 GC gc;
32 XFontStruct *font;
33 int flag;
34 } FontEnt;
35
36 typedef struct {
37 FontEnt fe[4];
38 } XWSGCSet;
39
40 typedef XWSGCSet *XWSGC;
41
42 /* XWSGCSet.flag */
43 #define TWOB 1 /* 2-byte character set */
44 #define FONTQUERY 2 /* XQueryFont()'ed by this library */
45 #define GCCREAT 4 /* XtGetGC()'ed by this library */
46 #define GRMAPPING 8 /* use GR */
47
48 #define GSET(c) ((c) & 0x8000 ? ((c) & 0x80 ? 1 : 3) : ((c) & 0x80 ? 2 : 0))
49
50 #if __STDC__ == 1
51 /* function prototype */
52 extern XWSGC XWSSetGCSet(Display *, GC, GC, GC, GC);
53 #ifdef _XtIntrinsic_h
54 extern XWSGC XtWSGetGCSet(Widget, unsigned long, XGCValues *,
55 XFontStruct *, XFontStruct *,
56 XFontStruct *, XFontStruct *);
57 extern void XtWSReleaseGCSet(Widget, XWSGC);
58 #endif
59 extern void XWSSetMapping(XWSGC, int, int, int, int);
60 extern void XtWSDestroyGCSet(XWSGC);
61 extern int XWSDrawString(Display *, Drawable, XWSGC, int, int, wchar *, int);
62 extern int XWSDrawImageString(Display *, Drawable, XWSGC,
63 int, int, wchar *, int);
64 extern void XWSFontHeight(XWSGC, wchar *, int, int *, int *);
65 extern int XWSTextWidth(XWSGC, wchar *, int);
66 extern void XWSTextExtents(XWSGC, wchar *, int, int *, int *, XCharStruct *);
67 #else
68 extern XWSGC XWSSetGCSet();
69 extern XWSGC XtWSGetGCSet();
70 extern void XtWSDestroyGCSet();
71 extern void XtWSReleaseGCSet();
72 extern void XWSSetMapping();
73 extern int XWSDrawString();
74 extern int XWSDrawImageString();
75 extern void XWSFontHeight();
76 extern int XWSTextWidth();
77 extern void XWSTextExtents();
78 #endif
79
80 #endif