mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-03 04:22:47 -05:00
Unified font selector dialog box. _Extremely_ unfinished - there's a
sizable TODO at the top of gtkfont.c - but it's basically functional enough to select fonts of both types, so I'm checking it in now before I accidentally break it. [originally from svn r7938]
This commit is contained in:
@ -36,11 +36,32 @@ typedef struct unifont {
|
||||
int width, height, ascent, descent;
|
||||
} unifont;
|
||||
|
||||
unifont *unifont_create(GtkWidget *widget, char *name, int wide, int bold,
|
||||
unifont *unifont_create(GtkWidget *widget, const char *name,
|
||||
int wide, int bold,
|
||||
int shadowoffset, int shadowalways);
|
||||
void unifont_destroy(unifont *font);
|
||||
void unifont_draw_text(GdkDrawable *target, GdkGC *gc, unifont *font,
|
||||
int x, int y, const char *string, int len,
|
||||
int wide, int bold, int cellwidth);
|
||||
|
||||
/*
|
||||
* Unified font selector dialog. I can't be bothered to do a
|
||||
* proper GTK subclassing today, so this will just be an ordinary
|
||||
* data structure with some useful members.
|
||||
*
|
||||
* (Of course, these aren't the only members; this structure is
|
||||
* contained within a bigger one which holds data visible only to
|
||||
* the implementation.)
|
||||
*/
|
||||
typedef struct unifontsel {
|
||||
void *user_data; /* settable by the user */
|
||||
GtkWindow *window;
|
||||
GtkWidget *ok_button, *cancel_button;
|
||||
} unifontsel;
|
||||
|
||||
unifontsel *unifontsel_new(const char *wintitle);
|
||||
void unifontsel_destroy(unifontsel *fontsel);
|
||||
void unifontsel_set_name(unifontsel *fontsel, const char *fontname);
|
||||
char *unifontsel_get_name(unifontsel *fontsel);
|
||||
|
||||
#endif /* PUTTY_GTKFONT_H */
|
||||
|
Reference in New Issue
Block a user