Mercurial > dwindows
diff gtk4/dw.c @ 2950:0577a97fe36d
Added dw_pixmap_get_width() and dw_pixmap_get_height() by request for language bindings.
These APIs function identical to the already existing DW_PIXMAP_HEIGHT/WIDTH() macros.
The macros will exist at least until the end of the 3.x series, at which point they
may be retired.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 03 Jan 2023 22:23:08 +0000 |
parents | edb4307ac7ce |
children | d84182f0054e |
line wrap: on
line diff
--- a/gtk4/dw.c Mon Jan 02 21:41:27 2023 +0000 +++ b/gtk4/dw.c Tue Jan 03 22:23:08 2023 +0000 @@ -7352,6 +7352,24 @@ } /* + * Returns the width of the pixmap, same as the DW_PIXMAP_WIDTH() macro, + * but exported as an API, for non-C language bindings. + */ +unsigned long API dw_pixmap_get_width(HPIXMAP pixmap) +{ + return pixmap ? pixmap->width : 0; +} + +/* + * Returns the height of the pixmap, same as the DW_PIXMAP_HEIGHT() macro, + * but exported as an API, for non-C language bindings. + */ +unsigned long API dw_pixmap_get_height(HPIXMAP pixmap) +{ + return pixmap ? pixmap->height : 0; +} + +/* * Copies from one item to another. * Parameters: * dest: Destination window handle.