diff android/dw.cpp @ 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 e6fb2558e29e
line wrap: on
line diff
--- a/android/dw.cpp	Mon Jan 02 21:41:27 2023 +0000
+++ b/android/dw.cpp	Tue Jan 03 22:23:08 2023 +0000
@@ -4989,6 +4989,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.