2 * Header file for gtkfont.c. Has to be separate from unix.h
3 * because it depends on GTK data types, hence can't be included
4 * from cross-platform code (which doesn't go near GTK).
7 #ifndef PUTTY_GTKFONT_H
8 #define PUTTY_GTKFONT_H
11 * Exports from gtkfont.c.
13 struct unifont_vtable
; /* contents internal to gtkfont.c */
14 typedef struct unifont
{
15 const struct unifont_vtable
*vt
;
17 * `Non-static data members' of the `class', accessible to
22 * public_charset is the charset used when the user asks for
23 * `Use font encoding'.
28 * Font dimensions needed by clients.
30 int width
, height
, ascent
, descent
;
33 unifont
*unifont_create(GtkWidget
*widget
, const char *name
,
35 int shadowoffset
, int shadowalways
);
36 void unifont_destroy(unifont
*font
);
37 void unifont_draw_text(GdkDrawable
*target
, GdkGC
*gc
, unifont
*font
,
38 int x
, int y
, const wchar_t *string
, int len
,
39 int wide
, int bold
, int cellwidth
);
42 * Unified font selector dialog. I can't be bothered to do a
43 * proper GTK subclassing today, so this will just be an ordinary
44 * data structure with some useful members.
46 * (Of course, these aren't the only members; this structure is
47 * contained within a bigger one which holds data visible only to
48 * the implementation.)
50 typedef struct unifontsel
{
51 void *user_data
; /* settable by the user */
53 GtkWidget
*ok_button
, *cancel_button
;
56 unifontsel
*unifontsel_new(const char *wintitle
);
57 void unifontsel_destroy(unifontsel
*fontsel
);
58 void unifontsel_set_name(unifontsel
*fontsel
, const char *fontname
);
59 char *unifontsel_get_name(unifontsel
*fontsel
);
61 #endif /* PUTTY_GTKFONT_H */