diff os2/dw.c @ 503:f3ed8dda02f8

Added dw_filesystem_change_*() and testcase code from Mark in dwtest. Also, added _fix_button_owner() to dw_window_redraw() on OS/2.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 18 Jan 2004 06:33:25 +0000
parents fe12a72bfddf
children c607eb385e58
line wrap: on
line diff
--- a/os2/dw.c	Sat Jan 17 16:19:02 2004 +0000
+++ b/os2/dw.c	Sun Jan 18 06:33:25 2004 +0000
@@ -302,7 +302,7 @@
 		GpiDeleteBitmap(hbm);
 }
 
-/* This function removes and handlers on windows and frees
+/* This function removes any handlers on windows and frees
  * the user memory allocated to it.
  */
 void _free_window_memory(HWND handle)
@@ -3686,6 +3686,7 @@
 	HWND window = client ? client : handle;
 	Box *mybox = (Box *)WinQueryWindowPtr(window, QWP_USER);
 
+	_fix_button_owner(_toplevel_window(handle), 0);
 	if(window && mybox)
 	{
 		unsigned long width, height;
@@ -6602,6 +6603,34 @@
 }
 
 /*
+ * Changes an existing item in specified row and column to the given data.
+ * Parameters:
+ *          handle: Handle to the container window (widget).
+ *          column: Zero based column of data being set.
+ *          row: Zero based row of data being set.
+ *          data: Pointer to the data to be added.
+ */
+void API dw_filesystem_change_item(HWND handle, int column, int row, void *data)
+{
+	dw_container_change_item(handle, column + 2, row, data);
+}
+
+/*
+ * Changes an item in specified row and column to the given data.
+ * Parameters:
+ *          handle: Handle to the container window (widget).
+ *          pointer: Pointer to the allocated memory in dw_container_alloc().
+ *          column: Zero based column of data being set.
+ *          row: Zero based row of data being set.
+ *          data: Pointer to the data to be added.
+ */
+void API dw_filesystem_change_file(HWND handle, int row, char *filename, unsigned long icon)
+{
+	dw_container_change_item(handle, 0, row, (void *)&icon);
+	dw_container_change_item(handle, 1, row, (void *)&filename);
+}
+
+/*
  * Sets an item in specified row and column to the given data.
  * Parameters:
  *          handle: Handle to the container window (widget).