Mercurial > kinput2.yaz
comparison include/KIFontSet.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 /* $Id: KIFontSet.h,v 1.2 1991/09/23 04:10:34 ishisone Rel $ */ | |
2 /* | |
3 * Copyright (c) 1991 Software Research Associates, Inc. | |
4 * | |
5 * Permission to use, copy, modify, and distribute this software and its | |
6 * documentation for any purpose and without fee is hereby granted, provided | |
7 * that the above copyright notice appear in all copies and that both that | |
8 * copyright notice and this permission notice appear in supporting | |
9 * documentation, and that the name of Software Research Associates not be | |
10 * used in advertising or publicity pertaining to distribution of the | |
11 * software without specific, written prior permission. Software Research | |
12 * Associates makes no representations about the suitability of this software | |
13 * for any purpose. It is provided "as is" without express or implied | |
14 * warranty. | |
15 * | |
16 * Author: Makoto Ishisone, Software Research Associates, Inc., Japan | |
17 */ | |
18 | |
19 #ifndef _KIFontSet_h | |
20 #define _KIFontSet_h | |
21 | |
22 typedef struct { | |
23 String pattern; /* must be in lower case | |
24 * ex) "iso8859-*", "jisx0208.1983-0" | |
25 */ | |
26 XtPointer cldata; | |
27 } KICharSetSpec; | |
28 | |
29 typedef struct { | |
30 KICharSetSpec *specs; /* first spec is the most preferrable | |
31 * charset. | |
32 */ | |
33 Cardinal num_specs; | |
34 } KICharSet; | |
35 | |
36 typedef struct { | |
37 XFontStruct *font; | |
38 String charset; /* matched KICharSetSpec's pattern */ | |
39 XtPointer cldata; /* matched KICharSetSpec's cldata */ | |
40 } KICharSetFont; | |
41 | |
42 /* | |
43 * int ExtractFontsFromFontSet(Display *dpy, String fontset_string, | |
44 * KICharSet *charsets, KICharSetFont *result, | |
45 * Cardinal num_charsets) | |
46 * | |
47 * gets appropriate fonts for each of give charsets from fontset_string. | |
48 * fontset_string is similar to base_font_name_list in XCreateFontSet(). | |
49 * returns number of matched fonts. | |
50 * | |
51 * note) use CachedFreeFont() to free fonts obtained by this function. | |
52 */ | |
53 extern int ExtractFontsFromFontSet( | |
54 #if NeedFunctionPrototypes | |
55 Display * /* dpy */, | |
56 String /* fontset_string */, | |
57 KICharSet * /* charsets */, | |
58 KICharSetFont * /* result (must be allocated by the caller) */, | |
59 Cardinal /* num_charsets */ | |
60 #endif | |
61 ); | |
62 | |
63 #endif |