changeset 52:0804483f6320

Added a redraw parameter to dw_container_clear().
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 11 Nov 2001 17:49:33 +0000
parents d97de82f0b6e
children 8add9a616d0e
files dw.h gtk/dw.c os2/dw.c win/dw.c
diffstat 4 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/dw.h	Fri Nov 09 14:03:57 2001 +0000
+++ b/dw.h	Sun Nov 11 17:49:33 2001 +0000
@@ -675,7 +675,7 @@
 void dw_container_set_column_width(HWND handle, int column, int width);
 void dw_container_set_row_title(void *pointer, int row, char *title);
 void dw_container_insert(HWND handle, void *pointer, int rowcount);
-void dw_container_clear(HWND handle);
+void dw_container_clear(HWND handle, int redraw);
 void dw_container_delete(HWND handle, int rowcount);
 void dw_container_set_view(HWND handle, unsigned long flags, int iconwidth, int iconheight);
 char *dw_container_query_start(HWND handle, unsigned long flags);
--- a/gtk/dw.c	Fri Nov 09 14:03:57 2001 +0000
+++ b/gtk/dw.c	Sun Nov 11 17:49:33 2001 +0000
@@ -3149,8 +3149,9 @@
  * Removes all rows from a container.
  * Parameters:
  *       handle: Handle to the window (widget) to be cleared.
+ *       redraw: TRUE to cause the container to redraw immediately.
  */
-void dw_container_clear(HWND handle)
+void dw_container_clear(HWND handle, int redraw)
 {
 	GtkWidget *clist;
 	GList *list;
--- a/os2/dw.c	Fri Nov 09 14:03:57 2001 +0000
+++ b/os2/dw.c	Sun Nov 11 17:49:33 2001 +0000
@@ -5043,12 +5043,13 @@
  * Removes all rows from a container.
  * Parameters:
  *       handle: Handle to the window (widget) to be cleared.
- */
-void dw_container_clear(HWND handle)
+ *       redraw: TRUE to cause the container to redraw immediately.
+ */
+void dw_container_clear(HWND handle, int redraw)
 {
 	int z = 0;
 
-	while((int)WinSendMsg(handle, CM_REMOVERECORD, (MPARAM)0L, MPFROM2SHORT(0, CMA_INVALIDATE | CMA_FREE)) == -1)
+	while((int)WinSendMsg(handle, CM_REMOVERECORD, (MPARAM)0L, MPFROM2SHORT(0, (redraw ? CMA_INVALIDATE : 0) | CMA_FREE)) == -1)
 	{
 		z++;
 		if(z > 5000000)
--- a/win/dw.c	Fri Nov 09 14:03:57 2001 +0000
+++ b/win/dw.c	Sun Nov 11 17:49:33 2001 +0000
@@ -5080,8 +5080,9 @@
  * Removes all rows from a container.
  * Parameters:
  *       handle: Handle to the window (widget) to be cleared.
- */
-void dw_container_clear(HWND handle)
+ *       redraw: TRUE to cause the container to redraw immediately.
+ */
+void dw_container_clear(HWND handle, int redraw)
 {
 	ListView_DeleteAllItems(handle);
 }