OSDN Git Service

Add support for MLSD responses from some broken hosts.
[ffftp/ffftp.git] / putty / UNIX / GTKFONT.H
1 /*\r
2  * Header file for gtkfont.c. Has to be separate from unix.h\r
3  * because it depends on GTK data types, hence can't be included\r
4  * from cross-platform code (which doesn't go near GTK).\r
5  */\r
6 \r
7 #ifndef PUTTY_GTKFONT_H\r
8 #define PUTTY_GTKFONT_H\r
9 \r
10 /*\r
11  * Exports from gtkfont.c.\r
12  */\r
13 struct unifont_vtable;                 /* contents internal to gtkfont.c */\r
14 typedef struct unifont {\r
15     const struct unifont_vtable *vt;\r
16     /*\r
17      * `Non-static data members' of the `class', accessible to\r
18      * external code.\r
19      */\r
20 \r
21     /*\r
22      * public_charset is the charset used when the user asks for\r
23      * `Use font encoding'.\r
24      * \r
25      * real_charset is the charset used when translating text into\r
26      * a form suitable for sending to unifont_draw_text().\r
27      * \r
28      * They can differ. For example, public_charset might be\r
29      * CS_ISO8859_1 while real_charset is CS_ISO8859_1_X11.\r
30      */\r
31     int public_charset, real_charset;\r
32 \r
33     /*\r
34      * Font dimensions needed by clients.\r
35      */\r
36     int width, height, ascent, descent;\r
37 } unifont;\r
38 \r
39 unifont *unifont_create(GtkWidget *widget, const char *name,\r
40                         int wide, int bold,\r
41                         int shadowoffset, int shadowalways);\r
42 void unifont_destroy(unifont *font);\r
43 void unifont_draw_text(GdkDrawable *target, GdkGC *gc, unifont *font,\r
44                        int x, int y, const char *string, int len,\r
45                        int wide, int bold, int cellwidth);\r
46 \r
47 /*\r
48  * Unified font selector dialog. I can't be bothered to do a\r
49  * proper GTK subclassing today, so this will just be an ordinary\r
50  * data structure with some useful members.\r
51  * \r
52  * (Of course, these aren't the only members; this structure is\r
53  * contained within a bigger one which holds data visible only to\r
54  * the implementation.)\r
55  */\r
56 typedef struct unifontsel {\r
57     void *user_data;                   /* settable by the user */\r
58     GtkWindow *window;\r
59     GtkWidget *ok_button, *cancel_button;\r
60 } unifontsel;\r
61 \r
62 unifontsel *unifontsel_new(const char *wintitle);\r
63 void unifontsel_destroy(unifontsel *fontsel);\r
64 void unifontsel_set_name(unifontsel *fontsel, const char *fontname);\r
65 char *unifontsel_get_name(unifontsel *fontsel);\r
66 \r
67 #endif /* PUTTY_GTKFONT_H */\r