# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1044087176 0 # Node ID b9283fd56d6909d6735d7514f2d86f035a4c25f2 # Parent 098ed34d41fb607cfc43c26927f2e5a7a030ed3f Updated scrollbar code on Unix and added dw_main_iteration() diff -r 098ed34d41fb -r b9283fd56d69 gtk/dw.c --- a/gtk/dw.c Sat Feb 01 08:00:38 2003 +0000 +++ b/gtk/dw.c Sat Feb 01 08:12:56 2003 +0000 @@ -830,6 +830,18 @@ } /* + * Processes a single message iteration and returns. + */ +void dw_main_iteration(void) +{ + _dw_thread = pthread_self(); + _dw_thread_add(_dw_thread); + gdk_threads_enter(); + gtk_main_iteration(); + gdk_threads_leave(); +} + +/* * Free's memory allocated by dynamic windows. * Parameters: * ptr: Pointer to dynamic windows allocated @@ -3283,8 +3295,9 @@ * Parameters: * handle: Handle to the scrollbar to be set. * range: Maximum range value. - */ -void API dw_scrollbar_set_range(HWND handle, unsigned int range) + * visible: Visible area relative to the range. + */ +void API dw_scrollbar_set_range(HWND handle, unsigned int range, unsigned int visible) { int _locked_by_me = FALSE; GtkAdjustment *adjustment; @@ -3295,7 +3308,10 @@ DW_MUTEX_LOCK; adjustment = (GtkAdjustment *)gtk_object_get_data(GTK_OBJECT(handle), "adjustment"); if(adjustment) - adjustment->upper = (gfloat)range; + { + adjustment->upper = (gdouble)range; + adjustment->page_size = (gdouble)visible; + } DW_MUTEX_UNLOCK; } @@ -7206,7 +7222,8 @@ if(GTK_IS_COMBO(thiswindow)) thiswindow = GTK_COMBO(thiswindow)->entry; } - else if(GTK_IS_VSCALE(thiswindow) || GTK_IS_HSCALE(thiswindow)) + else if(GTK_IS_VSCALE(thiswindow) || GTK_IS_HSCALE(thiswindow) || + GTK_IS_VSCROLLBAR(thiswindow) || GTK_IS_HSCROLLBAR(thiswindow)) { thiswindow = (GtkWidget *)gtk_object_get_data(GTK_OBJECT(thiswindow), "adjustment"); }