changeset 2710:98cc4476b376

Android: Add comments, TODOs for functions that should eventually be implmented. And descriptions of ones that probably don't need to be on Android.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 22 Nov 2021 03:02:13 +0000
parents 3cb5aa73dace
children 00e42b9c9ebc
files android/dw.cpp
diffstat 1 files changed, 43 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/android/dw.cpp	Mon Nov 22 02:18:08 2021 +0000
+++ b/android/dw.cpp	Mon Nov 22 03:02:13 2021 +0000
@@ -2830,6 +2830,7 @@
  */
 void API dw_mle_freeze(HWND handle)
 {
+    /* Don't think this is necessary on Android */
 }
 
 /*
@@ -2839,6 +2840,7 @@
  */
 void API dw_mle_thaw(HWND handle)
 {
+    /* Don't think this is necessary on Android */
 }
 
 HWND _dw_text_new(const char *text, ULONG cid, int status)
@@ -2964,6 +2966,7 @@
  */
 unsigned long API dw_color_choose(unsigned long value)
 {
+    /* TODO: Implement this */
     return value;
 }
 
@@ -3200,6 +3203,7 @@
  */
 HWND API dw_tree_new(ULONG cid)
 {
+    /* TODO: Implement the tree if possible. */
     return nullptr;
 }
 
@@ -3217,6 +3221,7 @@
  */
 HTREEITEM API dw_tree_insert_after(HWND handle, HTREEITEM item, const char *title, HICN icon, HTREEITEM parent, void *itemdata)
 {
+    /* TODO: Implement the tree if possible. */
     return nullptr;
 }
 
@@ -3233,6 +3238,7 @@
  */
 HTREEITEM API dw_tree_insert(HWND handle, const char *title, HICN icon, HTREEITEM parent, void *itemdata)
 {
+    /* TODO: Implement the tree if possible. */
     return nullptr;
 }
 
@@ -3246,6 +3252,7 @@
  */
 char * API dw_tree_get_title(HWND handle, HTREEITEM item)
 {
+    /* TODO: Implement the tree if possible. */
     return nullptr;
 }
 
@@ -3259,6 +3266,7 @@
  */
 HTREEITEM API dw_tree_get_parent(HWND handle, HTREEITEM item)
 {
+    /* TODO: Implement the tree if possible. */
     return nullptr;
 }
 
@@ -3272,6 +3280,7 @@
  */
 void API dw_tree_item_change(HWND handle, HTREEITEM item, const char *title, HICN icon)
 {
+    /* TODO: Implement the tree if possible. */
 }
 
 /*
@@ -3283,6 +3292,7 @@
  */
 void API dw_tree_item_set_data(HWND handle, HTREEITEM item, void *itemdata)
 {
+    /* TODO: Implement the tree if possible. */
 }
 
 /*
@@ -3295,6 +3305,7 @@
  */
 void * API dw_tree_item_get_data(HWND handle, HTREEITEM item)
 {
+    /* TODO: Implement the tree if possible. */
     return nullptr;
 }
 
@@ -3306,6 +3317,7 @@
  */
 void API dw_tree_item_select(HWND handle, HTREEITEM item)
 {
+    /* TODO: Implement the tree if possible. */
 }
 
 /*
@@ -3315,6 +3327,7 @@
  */
 void API dw_tree_clear(HWND handle)
 {
+    /* TODO: Implement the tree if possible. */
 }
 
 /*
@@ -3325,6 +3338,7 @@
  */
 void API dw_tree_item_expand(HWND handle, HTREEITEM item)
 {
+    /* TODO: Implement the tree if possible. */
 }
 
 /*
@@ -3335,6 +3349,7 @@
  */
 void API dw_tree_item_collapse(HWND handle, HTREEITEM item)
 {
+    /* TODO: Implement the tree if possible. */
 }
 
 /*
@@ -4095,6 +4110,7 @@
  */
 void API dw_container_optimize(HWND handle)
 {
+    /* Not necessary with no columns */
 }
 
 /*
@@ -4490,6 +4506,7 @@
  */
 void API dw_pixmap_set_transparent_color( HPIXMAP pixmap, ULONG color )
 {
+    /* Not necessary on Android, all versions support transparency. */
 }
 
 /*
@@ -4878,6 +4895,11 @@
  */
 void API dw_pointer_query_pos(long *x, long *y)
 {
+    /* No mouse pointer on Android */
+    if(x)
+        *x = 0;
+    if(y)
+        *y = 0;
 }
 
 /*
@@ -4888,6 +4910,7 @@
  */
 void API dw_pointer_set_pos(long x, long y)
 {
+    /* No mouse pointer on Android */
 }
 
 /*
@@ -5352,6 +5375,7 @@
  */
 void API dw_window_set_pointer(HWND handle, int pointertype)
 {
+    /* No mouse pointer on Android */
 }
 
 int _dw_window_hide_show(HWND handle, int state)
@@ -5440,6 +5464,7 @@
  */
 int API dw_window_set_border(HWND handle, int border)
 {
+    /* No overlapping windows on Android, so no border */
     return DW_ERROR_GENERAL;
 }
 
@@ -5524,6 +5549,7 @@
  */
 void API dw_window_click_default(HWND handle, HWND next)
 {
+    /* TODO: See if this is possible on Android */
 }
 
 /*
@@ -5533,6 +5559,7 @@
  */
 void API dw_window_capture(HWND handle)
 {
+    /* No mouse pointer on Android */
 }
 
 /*
@@ -5540,6 +5567,7 @@
  */
 void API dw_window_release(void)
 {
+    /* No mouse pointer on Android */
 }
 
 /*
@@ -5550,6 +5578,7 @@
  */
 void API dw_window_reparent(HWND handle, HWND newparent)
 {
+    /* TODO: Do we need to do implement this? */
 }
 
 /*
@@ -5627,6 +5656,7 @@
  */
 void API dw_font_set_default(const char *fontname)
 {
+    /* TODO: Implement this */
 }
 
 /*
@@ -5718,6 +5748,7 @@
  */
 void API dw_window_set_tooltip(HWND handle, const char *bubbletext)
 {
+    /* No mouse pointer on Android */
 }
 
 void _dw_window_set_enabled(HWND handle, jboolean state)
@@ -5835,6 +5866,7 @@
  */
 void API dw_window_set_icon(HWND handle, HICN icon)
 {
+    /* TODO: See if this is possible, the icon is controlled by app resources */
 }
 
 /*
@@ -5872,6 +5904,7 @@
  */
 int API dw_window_minimize(HWND handle)
 {
+    /* TODO: Not sure if we should do anything here */
     return DW_ERROR_GENERAL;
 }
 
@@ -5881,6 +5914,7 @@
  */
 void API dw_window_redraw(HWND handle)
 {
+    /* Shouldn't be necessary on Android */
 }
 
 /*
@@ -5892,6 +5926,7 @@
  */
 int API dw_window_raise(HWND handle)
 {
+    /* TODO: Not sure if we should do anything here */
     return DW_ERROR_GENERAL;
 }
 
@@ -5904,6 +5939,7 @@
  */
 int API dw_window_lower(HWND handle)
 {
+    /* TODO: Not sure if we should do anyting here */
     return DW_ERROR_GENERAL;
 }
 
@@ -5916,6 +5952,7 @@
  */
 void API dw_window_set_size(HWND handle, ULONG width, ULONG height)
 {
+    /* Not possible on Android */
 }
 
 /*
@@ -5967,6 +6004,7 @@
  */
 void API dw_window_set_gravity(HWND handle, int horz, int vert)
 {
+    /* This is not possible on Android */
 }
 
 /*
@@ -5978,6 +6016,7 @@
  */
 void API dw_window_set_pos(HWND handle, LONG x, LONG y)
 {
+    /* This is not possible on Android */
 }
 
 /*
@@ -5991,6 +6030,7 @@
  */
 void API dw_window_set_pos_size(HWND handle, LONG x, LONG y, ULONG width, ULONG height)
 {
+    /* This is not possible on Android */
 }
 
 /*
@@ -7431,6 +7471,7 @@
  */
 HPRINT API dw_print_new(const char *jobname, unsigned long flags, unsigned int pages, void *drawfunc, void *drawdata)
 {
+    /* TODO: Implement printing */
     return nullptr;
 }
 
@@ -7444,6 +7485,7 @@
  */
 int API dw_print_run(HPRINT print, unsigned long flags)
 {
+    /* TODO: Implement printing */
     return DW_ERROR_UNKNOWN;
 }
 
@@ -7454,6 +7496,7 @@
  */
 void API dw_print_cancel(HPRINT print)
 {
+    /* TODO: Implement printing */
 }
 
 /*