Mercurial > dwindows
diff dw.h @ 1146:9d97610b2140
Adding dw_pixmap_set_font() which is equivalent to dw_window_set_font() except for pixmaps.
When drawing to pixmaps, normally the font is obtained from the associated window handle.
This will allow overriding of the font for this pixmap, and will allow setting fonts on
pixmaps that don't have associated window handles.
This commit has the Mac support. Other platforms coming in the next hour.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 11 Sep 2011 21:36:07 +0000 |
parents | 1a5b0908659b |
children | 439f276042cc |
line wrap: on
line diff
--- a/dw.h Sun Sep 11 20:52:44 2011 +0000 +++ b/dw.h Sun Sep 11 21:36:07 2011 +0000 @@ -306,7 +306,7 @@ typedef struct _hpixmap { unsigned long width, height; - void *image; + void *image, *font; HWND handle; } *HPIXMAP; @@ -636,6 +636,7 @@ HWND handle; void *bits; unsigned long depth; + HFONT font; } *HPIXMAP; typedef HWND HMENUI; @@ -1257,6 +1258,8 @@ typedef struct _hpixmap { unsigned long width, height; + HWND handle; + void *font; #if GTK_MAJOR_VERSION > 2 GdkPixbuf *pixbuf; /* the actual image */ cairo_surface_t *image; /* Going to have dual storage for now */ @@ -1264,7 +1267,6 @@ GdkPixmap *pixmap; /* the actual image */ GdkBitmap *bitmap; /* if not null, the image mask representing the transparency mask */ #endif - HWND handle; } *HPIXMAP; typedef GtkWidget *HMENUI; @@ -1647,6 +1649,7 @@ HPIXMAP API dw_pixmap_new_from_data(HWND handle, char *data, int len); HPIXMAP API dw_pixmap_grab(HWND handle, ULONG id); void API dw_pixmap_set_transparent_color( HPIXMAP pixmap, ULONG color ); +int API dw_pixmap_set_font(HPIXMAP pixmap, char *fontname); void API dw_pixmap_destroy(HPIXMAP pixmap); void API dw_beep(int freq, int dur); int API dw_messagebox(char *title, int flags, char *format, ...);