Mercurial > dwindows
comparison 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 |
comparison
equal
deleted
inserted
replaced
2949:a1d0522d7edf | 2950:0577a97fe36d |
---|---|
7350 free(pixmap); | 7350 free(pixmap); |
7351 DW_FUNCTION_RETURN_NOTHING; | 7351 DW_FUNCTION_RETURN_NOTHING; |
7352 } | 7352 } |
7353 | 7353 |
7354 /* | 7354 /* |
7355 * Returns the width of the pixmap, same as the DW_PIXMAP_WIDTH() macro, | |
7356 * but exported as an API, for non-C language bindings. | |
7357 */ | |
7358 unsigned long API dw_pixmap_get_width(HPIXMAP pixmap) | |
7359 { | |
7360 return pixmap ? pixmap->width : 0; | |
7361 } | |
7362 | |
7363 /* | |
7364 * Returns the height of the pixmap, same as the DW_PIXMAP_HEIGHT() macro, | |
7365 * but exported as an API, for non-C language bindings. | |
7366 */ | |
7367 unsigned long API dw_pixmap_get_height(HPIXMAP pixmap) | |
7368 { | |
7369 return pixmap ? pixmap->height : 0; | |
7370 } | |
7371 | |
7372 /* | |
7355 * Copies from one item to another. | 7373 * Copies from one item to another. |
7356 * Parameters: | 7374 * Parameters: |
7357 * dest: Destination window handle. | 7375 * dest: Destination window handle. |
7358 * destp: Destination pixmap. (choose only one). | 7376 * destp: Destination pixmap. (choose only one). |
7359 * xdest: X coordinate of destination. | 7377 * xdest: X coordinate of destination. |