mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
version bump to 1.1.8, binary age 0, interface age 0, depend on GLib
Wed Dec 16 05:26:32 1998 Tim Janik <timj@gtk.org> * configure.in: version bump to 1.1.8, binary age 0, interface age 0, depend on GLib 1.1.8. * gdk/gdkprivate.h: * gdk/gdkglobals.c: removed last Gdk threads specific bits. * gtk/gtkmain.c (gtk_init): s/g_thread_supported/g_thread_supported()/. * gtk/gtkprivate.h: changed GTK_THREADS_ENTER and GTK_THREADS_LEAVE to function macros GTK_THREADS_ENTER() and GTK_THREADS_LEAVE(). honour G_THREADS_ENABLED in the definition of GTK_THREADS_ENTER() and GTK_THREADS_LEAVE(). changed callers accordingly.
This commit is contained in:
parent
2c9c7efb23
commit
017dfc9e4e
@ -295,7 +295,13 @@ stamp-m: @REBUILD@ gtkmarshal.list genmarshal.pl
|
||||
&& echo timestamp > stamp-m
|
||||
|
||||
libgtk_la_LDFLAGS = \
|
||||
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -release $(LT_RELEASE)
|
||||
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -release $(LT_RELEASE) \
|
||||
@GLIB_LIBS@ \
|
||||
@x_ldflags@ \
|
||||
@x_libs@ \
|
||||
-lm
|
||||
# $(top_builddir)/gdk/libgdk.la
|
||||
|
||||
|
||||
# We create a dummy theme for the default GTK+ theme
|
||||
|
||||
|
@ -354,9 +354,9 @@ gtk_accel_label_refetch_idle (GtkAccelLabel *accel_label)
|
||||
{
|
||||
gboolean retval;
|
||||
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
retval = gtk_accel_label_refetch (accel_label);
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
@ -7014,7 +7014,7 @@ horizontal_timeout (GtkCList *clist)
|
||||
GdkEventMotion event;
|
||||
GdkModifierType mask;
|
||||
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
|
||||
clist->htimer = 0;
|
||||
gdk_window_get_pointer (clist->clist_window, &x, &y, &mask);
|
||||
@ -7026,7 +7026,7 @@ horizontal_timeout (GtkCList *clist)
|
||||
|
||||
gtk_clist_motion (GTK_WIDGET (clist), &event);
|
||||
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@ -7038,7 +7038,7 @@ vertical_timeout (GtkCList *clist)
|
||||
GdkEventMotion event;
|
||||
GdkModifierType mask;
|
||||
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
|
||||
clist->vtimer = 0;
|
||||
gdk_window_get_pointer (clist->clist_window, &x, &y, &mask);
|
||||
@ -7050,7 +7050,7 @@ vertical_timeout (GtkCList *clist)
|
||||
|
||||
gtk_clist_motion (GTK_WIDGET (clist), &event);
|
||||
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -864,7 +864,7 @@ gtk_color_selection_drag_begin (GtkWidget *widget,
|
||||
GdkColor bg;
|
||||
|
||||
window = gtk_window_new(GTK_WINDOW_POPUP);
|
||||
GTK_WIDGET_SET_FLAGS (window, GTK_USER_DRAW);
|
||||
gtk_widget_set_app_paintable (GTK_WIDGET (window), TRUE);
|
||||
gtk_widget_set_usize (window, 48, 32);
|
||||
gtk_widget_realize (window);
|
||||
|
||||
@ -1028,13 +1028,13 @@ gtk_color_selection_value_timeout (GtkColorSelection *colorsel)
|
||||
{
|
||||
gint x, y;
|
||||
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
|
||||
gdk_window_get_pointer (colorsel->value_area->window, &x, &y, NULL);
|
||||
gtk_color_selection_update_value (colorsel, y);
|
||||
gtk_color_selection_color_changed (colorsel);
|
||||
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
|
||||
return (TRUE);
|
||||
}
|
||||
|
@ -237,9 +237,9 @@ gtk_combo_focus_idle (GtkCombo * combo)
|
||||
{
|
||||
if (combo)
|
||||
{
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
gtk_widget_grab_focus (combo->entry);
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -811,7 +811,7 @@ gtk_container_get_resize_container (GtkContainer *container)
|
||||
static gboolean
|
||||
gtk_container_idle_sizer (gpointer data)
|
||||
{
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
|
||||
/* we may be invoked with a container_resize_queue of NULL, because
|
||||
* queue_resize could have been adding an extra idle function while
|
||||
@ -833,7 +833,7 @@ gtk_container_idle_sizer (gpointer data)
|
||||
gtk_container_check_resize (GTK_CONTAINER (widget));
|
||||
}
|
||||
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1756,7 +1756,7 @@ gtk_drag_set_icon_pixmap (GdkDragContext *context,
|
||||
gtk_widget_push_colormap (colormap);
|
||||
|
||||
window = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
GTK_WIDGET_SET_FLAGS (window, GTK_USER_DRAW);
|
||||
gtk_widget_set_app_paintable (GTK_WIDGET (window), TRUE);
|
||||
|
||||
gtk_widget_pop_visual ();
|
||||
gtk_widget_pop_colormap ();
|
||||
@ -2272,7 +2272,7 @@ gtk_drag_anim_timeout (gpointer data)
|
||||
gint x, y;
|
||||
gboolean retval;
|
||||
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
|
||||
if (anim->step == anim->n_steps)
|
||||
{
|
||||
@ -2295,7 +2295,7 @@ gtk_drag_anim_timeout (gpointer data)
|
||||
retval = TRUE;
|
||||
}
|
||||
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
@ -1481,13 +1481,13 @@ gtk_entry_timer (gpointer data)
|
||||
{
|
||||
GtkEntry *entry;
|
||||
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
|
||||
entry = GTK_ENTRY (data);
|
||||
entry->timer = 0;
|
||||
gtk_entry_draw_text (entry);
|
||||
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -2309,7 +2309,7 @@ gtk_list_horizontal_timeout (GtkWidget *list)
|
||||
GdkEventMotion event;
|
||||
GdkModifierType mask;
|
||||
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
|
||||
GTK_LIST (list)->htimer = 0;
|
||||
gdk_window_get_pointer (list->window, &x, &y, &mask);
|
||||
@ -2321,7 +2321,7 @@ gtk_list_horizontal_timeout (GtkWidget *list)
|
||||
|
||||
gtk_list_motion_notify (list, &event);
|
||||
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@ -2334,7 +2334,7 @@ gtk_list_vertical_timeout (GtkWidget *list)
|
||||
GdkEventMotion event;
|
||||
GdkModifierType mask;
|
||||
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
|
||||
GTK_LIST (list)->vtimer = 0;
|
||||
gdk_window_get_pointer (list->window, &x, &y, &mask);
|
||||
@ -2346,7 +2346,7 @@ gtk_list_vertical_timeout (GtkWidget *list)
|
||||
|
||||
gtk_list_motion_notify (list, &event);
|
||||
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -43,8 +43,6 @@
|
||||
#include "gtkdebug.h"
|
||||
#include "gtkintl.h"
|
||||
|
||||
extern gboolean gdk_using_threads;
|
||||
|
||||
/* Private type definitions
|
||||
*/
|
||||
typedef struct _GtkInitFunction GtkInitFunction;
|
||||
@ -187,9 +185,9 @@ gtk_init (int *argc,
|
||||
* single threaded until gtk_init().
|
||||
*/
|
||||
|
||||
if (g_thread_supported)
|
||||
if (g_thread_supported ())
|
||||
gtk_threads_mutex = g_mutex_new ();
|
||||
|
||||
|
||||
#if 0
|
||||
g_set_error_handler (gtk_error);
|
||||
g_set_warning_handler (gtk_warning);
|
||||
@ -461,9 +459,9 @@ gtk_main (void)
|
||||
loop = g_main_new ();
|
||||
main_loops = g_slist_prepend (main_loops, loop);
|
||||
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
g_main_run (loop);
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
|
||||
g_main_destroy (loop);
|
||||
|
||||
@ -1075,12 +1073,12 @@ gtk_idle_remove_by_data (gpointer data)
|
||||
}
|
||||
|
||||
guint
|
||||
gtk_input_add_full (gint source,
|
||||
GdkInputCondition condition,
|
||||
GdkInputFunction function,
|
||||
GtkCallbackMarshal marshal,
|
||||
gpointer data,
|
||||
GtkDestroyNotify destroy)
|
||||
gtk_input_add_full (gint source,
|
||||
GdkInputCondition condition,
|
||||
GdkInputFunction function,
|
||||
GtkCallbackMarshal marshal,
|
||||
gpointer data,
|
||||
GtkDestroyNotify destroy)
|
||||
{
|
||||
if (marshal)
|
||||
{
|
||||
@ -1111,6 +1109,7 @@ static void
|
||||
gtk_destroy_closure (gpointer data)
|
||||
{
|
||||
GtkClosure *closure = data;
|
||||
|
||||
if (closure->destroy)
|
||||
(closure->destroy) (closure->data);
|
||||
g_free (closure);
|
||||
@ -1131,8 +1130,8 @@ gtk_invoke_idle_timeout (gpointer data)
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_invoke_input (gpointer data,
|
||||
gint source,
|
||||
gtk_invoke_input (gpointer data,
|
||||
gint source,
|
||||
GdkInputCondition condition)
|
||||
{
|
||||
GtkClosure *closure = data;
|
||||
@ -1150,7 +1149,7 @@ gtk_invoke_input (gpointer data,
|
||||
closure->marshal (NULL, closure->data, 2, args);
|
||||
}
|
||||
|
||||
GdkEvent *
|
||||
GdkEvent*
|
||||
gtk_get_current_event (void)
|
||||
{
|
||||
if (current_events)
|
||||
@ -1252,13 +1251,13 @@ gtk_propagate_event (GtkWidget *widget,
|
||||
void
|
||||
gtk_threads_enter ()
|
||||
{
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
}
|
||||
|
||||
void
|
||||
gtk_threads_leave ()
|
||||
{
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
@ -621,7 +621,7 @@ gtk_menu_item_select_timeout (gpointer data)
|
||||
{
|
||||
GtkMenuItem *menu_item;
|
||||
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
|
||||
menu_item = GTK_MENU_ITEM (data);
|
||||
menu_item->timer = 0;
|
||||
@ -644,7 +644,7 @@ gtk_menu_item_select_timeout (gpointer data)
|
||||
gtk_menu_shell_select_item (submenu, submenu->children->data);
|
||||
}
|
||||
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1837,7 +1837,7 @@ gtk_notebook_timer (GtkNotebook *notebook)
|
||||
{
|
||||
gboolean retval = FALSE;
|
||||
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
|
||||
if (notebook->timer)
|
||||
{
|
||||
@ -1866,7 +1866,7 @@ gtk_notebook_timer (GtkNotebook *notebook)
|
||||
retval = TRUE;
|
||||
}
|
||||
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
@ -64,14 +64,20 @@ typedef enum
|
||||
|
||||
extern GMutex *gtk_threads_mutex;
|
||||
|
||||
#define GTK_THREADS_ENTER G_STMT_START { \
|
||||
if (gtk_threads_mutex) \
|
||||
g_mutex_lock (gtk_threads_mutex); \
|
||||
} G_STMT_END
|
||||
#define GTK_THREADS_LEAVE G_STMT_START { \
|
||||
if (gtk_threads_mutex) \
|
||||
g_mutex_unlock (gtk_threads_mutex); \
|
||||
} G_STMT_END
|
||||
#ifdef G_THREADS_ENABLED
|
||||
# define GTK_THREADS_ENTER() G_STMT_START { \
|
||||
if (gtk_threads_mutex) \
|
||||
g_mutex_lock (gtk_threads_mutex); \
|
||||
} G_STMT_END
|
||||
# define GTK_THREADS_LEAVE() G_STMT_START { \
|
||||
if (gtk_threads_mutex) \
|
||||
g_mutex_unlock (gtk_threads_mutex); \
|
||||
} G_STMT_END
|
||||
#else /* !G_THREADS_ENABLED */
|
||||
# define GTK_THREADS_ENTER()
|
||||
# define GTK_THREADS_LEAVE()
|
||||
#endif /* !G_THREADS_ENABLED */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -1237,7 +1237,7 @@ gtk_real_range_timer (GtkRange *range)
|
||||
{
|
||||
gint return_val;
|
||||
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
|
||||
return_val = TRUE;
|
||||
if (range->click_child == RANGE_CLASS (range)->slider)
|
||||
@ -1259,7 +1259,7 @@ gtk_real_range_timer (GtkRange *range)
|
||||
(gpointer) range);
|
||||
else
|
||||
{
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
return FALSE;
|
||||
}
|
||||
range->need_timer = FALSE;
|
||||
@ -1287,7 +1287,7 @@ gtk_real_range_timer (GtkRange *range)
|
||||
return_val = gtk_range_scroll (range, -1);
|
||||
}
|
||||
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
|
||||
return return_val;
|
||||
}
|
||||
|
@ -1092,7 +1092,7 @@ gtk_selection_incr_timeout (GtkIncrInfo *info)
|
||||
GList *tmp_list;
|
||||
gboolean retval;
|
||||
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
|
||||
/* Determine if retrieval has finished by checking if it still in
|
||||
list of pending retrievals */
|
||||
@ -1129,7 +1129,7 @@ gtk_selection_incr_timeout (GtkIncrInfo *info)
|
||||
retval = TRUE; /* timeout will happen again */
|
||||
}
|
||||
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
|
||||
return retval;
|
||||
}
|
||||
@ -1334,7 +1334,7 @@ gtk_selection_retrieval_timeout (GtkRetrievalInfo *info)
|
||||
GList *tmp_list;
|
||||
gboolean retval;
|
||||
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
|
||||
/* Determine if retrieval has finished by checking if it still in
|
||||
list of pending retrievals */
|
||||
@ -1369,7 +1369,7 @@ gtk_selection_retrieval_timeout (GtkRetrievalInfo *info)
|
||||
retval = TRUE; /* timeout will happen again */
|
||||
}
|
||||
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
@ -910,7 +910,7 @@ gtk_spin_button_timer (GtkSpinButton *spin_button)
|
||||
{
|
||||
gboolean retval = FALSE;
|
||||
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
|
||||
if (spin_button->timer)
|
||||
{
|
||||
@ -943,7 +943,7 @@ gtk_spin_button_timer (GtkSpinButton *spin_button)
|
||||
}
|
||||
}
|
||||
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
@ -1701,7 +1701,7 @@ gtk_text_scroll_timeout (gpointer data)
|
||||
gint x, y;
|
||||
GdkModifierType mask;
|
||||
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
|
||||
text = GTK_TEXT (data);
|
||||
|
||||
@ -1718,7 +1718,7 @@ gtk_text_scroll_timeout (gpointer data)
|
||||
gtk_text_motion_notify (GTK_WIDGET (text), &event);
|
||||
}
|
||||
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ gtk_tooltips_force_window (GtkTooltips *tooltips)
|
||||
if (!tooltips->tip_window)
|
||||
{
|
||||
tooltips->tip_window = gtk_window_new (GTK_WINDOW_POPUP);
|
||||
GTK_WIDGET_SET_FLAGS (tooltips->tip_window, GTK_USER_DRAW);
|
||||
gtk_widget_set_app_paintable (tooltips->tip_window, TRUE);
|
||||
gtk_window_set_policy (GTK_WINDOW (tooltips->tip_window), FALSE, FALSE, TRUE);
|
||||
|
||||
gtk_signal_connect_object (GTK_OBJECT (tooltips->tip_window),
|
||||
@ -495,13 +495,13 @@ gtk_tooltips_timeout (gpointer data)
|
||||
{
|
||||
GtkTooltips *tooltips = (GtkTooltips *) data;
|
||||
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
|
||||
if (tooltips->active_tips_data != NULL &&
|
||||
GTK_WIDGET_DRAWABLE (tooltips->active_tips_data->widget))
|
||||
gtk_tooltips_draw_tips (tooltips);
|
||||
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -102,6 +102,7 @@ enum {
|
||||
ARG_HEIGHT,
|
||||
ARG_VISIBLE,
|
||||
ARG_SENSITIVE,
|
||||
ARG_APP_PAINTABLE,
|
||||
ARG_CAN_FOCUS,
|
||||
ARG_HAS_FOCUS,
|
||||
ARG_CAN_DEFAULT,
|
||||
@ -270,6 +271,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
|
||||
gtk_object_add_arg_type ("GtkWidget::height", GTK_TYPE_INT, GTK_ARG_READWRITE, ARG_HEIGHT);
|
||||
gtk_object_add_arg_type ("GtkWidget::visible", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_VISIBLE);
|
||||
gtk_object_add_arg_type ("GtkWidget::sensitive", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_SENSITIVE);
|
||||
gtk_object_add_arg_type ("GtkWidget::app_paintable", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_APP_PAINTABLE);
|
||||
gtk_object_add_arg_type ("GtkWidget::can_focus", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_CAN_FOCUS);
|
||||
gtk_object_add_arg_type ("GtkWidget::has_focus", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_HAS_FOCUS);
|
||||
gtk_object_add_arg_type ("GtkWidget::can_default", GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_CAN_DEFAULT);
|
||||
@ -807,6 +809,9 @@ gtk_widget_set_arg (GtkObject *object,
|
||||
case ARG_SENSITIVE:
|
||||
gtk_widget_set_sensitive (widget, GTK_VALUE_BOOL (*arg));
|
||||
break;
|
||||
case ARG_APP_PAINTABLE:
|
||||
gtk_widget_set_app_paintable (widget, GTK_VALUE_BOOL (*arg));
|
||||
break;
|
||||
case ARG_CAN_FOCUS:
|
||||
saved_flags = GTK_WIDGET_FLAGS (widget);
|
||||
if (GTK_VALUE_BOOL (*arg))
|
||||
@ -920,6 +925,9 @@ gtk_widget_get_arg (GtkObject *object,
|
||||
case ARG_SENSITIVE:
|
||||
GTK_VALUE_BOOL (*arg) = (GTK_WIDGET_SENSITIVE (widget) != FALSE);
|
||||
break;
|
||||
case ARG_APP_PAINTABLE:
|
||||
GTK_VALUE_BOOL (*arg) = (GTK_WIDGET_APP_PAINTABLE (widget) != FALSE);
|
||||
break;
|
||||
case ARG_CAN_FOCUS:
|
||||
GTK_VALUE_BOOL (*arg) = (GTK_WIDGET_CAN_FOCUS (widget) != FALSE);
|
||||
break;
|
||||
@ -1950,7 +1958,7 @@ gtk_widget_idle_draw (gpointer data)
|
||||
GSList *draw_data_list;
|
||||
GtkWidget *widget;
|
||||
|
||||
GTK_THREADS_ENTER;
|
||||
GTK_THREADS_ENTER ();
|
||||
|
||||
/* Translate all draw requests to be allocation-relative */
|
||||
widget_list = gtk_widget_redraw_queue;
|
||||
@ -2133,7 +2141,7 @@ gtk_widget_idle_draw (gpointer data)
|
||||
g_slist_free (gtk_widget_redraw_queue);
|
||||
gtk_widget_redraw_queue = NULL;
|
||||
|
||||
GTK_THREADS_LEAVE;
|
||||
GTK_THREADS_LEAVE ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@ -3041,6 +3049,27 @@ gtk_widget_set_state (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gtk_widget_set_app_paintable (GtkWidget *widget,
|
||||
gboolean app_paintable)
|
||||
{
|
||||
g_return_if_fail (widget != NULL);
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
app_paintable = (app_paintable != FALSE);
|
||||
|
||||
if (GTK_WIDGET_APP_PAINTABLE (widget) != app_paintable)
|
||||
{
|
||||
if (app_paintable)
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_APP_PAINTABLE);
|
||||
else
|
||||
GTK_WIDGET_UNSET_FLAGS (widget, GTK_APP_PAINTABLE);
|
||||
|
||||
if (GTK_WIDGET_DRAWABLE (widget))
|
||||
gtk_widget_queue_clear (widget);
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
* gtk_widget_set_sensitive:
|
||||
*
|
||||
|
@ -51,7 +51,7 @@ typedef enum
|
||||
GTK_RC_STYLE = 1 << 16,
|
||||
GTK_COMPOSITE_CHILD = 1 << 17,
|
||||
GTK_NO_REPARENT = 1 << 18,
|
||||
GTK_USER_DRAW = 1 << 19
|
||||
GTK_APP_PAINTABLE = 1 << 19
|
||||
} GtkWidgetFlags;
|
||||
|
||||
/* Macro for casting a pointer to a GtkWidget or GtkWidgetClass pointer.
|
||||
@ -89,7 +89,7 @@ typedef enum
|
||||
#define GTK_WIDGET_HAS_GRAB(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_HAS_GRAB) != 0)
|
||||
#define GTK_WIDGET_RC_STYLE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_RC_STYLE) != 0)
|
||||
#define GTK_WIDGET_COMPOSITE_CHILD(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_COMPOSITE_CHILD) != 0)
|
||||
#define GTK_WIDGET_USER_DRAW(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_USER_DRAW) != 0)
|
||||
#define GTK_WIDGET_APP_PAINTABLE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_APP_PAINTABLE) != 0)
|
||||
|
||||
/* Macros for setting and clearing widget flags.
|
||||
*/
|
||||
@ -499,7 +499,9 @@ gchar* gtk_widget_get_name (GtkWidget *widget);
|
||||
void gtk_widget_set_state (GtkWidget *widget,
|
||||
GtkStateType state);
|
||||
void gtk_widget_set_sensitive (GtkWidget *widget,
|
||||
gint sensitive);
|
||||
gboolean sensitive);
|
||||
void gtk_widget_set_app_paintable (GtkWidget *widget,
|
||||
gboolean app_paintable);
|
||||
void gtk_widget_set_parent (GtkWidget *widget,
|
||||
GtkWidget *parent);
|
||||
void gtk_widget_set_parent_window (GtkWidget *widget,
|
||||
|
@ -1634,7 +1634,7 @@ gtk_window_expose (GtkWidget *widget,
|
||||
g_return_val_if_fail (GTK_IS_WINDOW (widget), FALSE);
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
|
||||
if (!GTK_WIDGET_USER_DRAW (widget))
|
||||
if (!GTK_WIDGET_APP_PAINTABLE (widget))
|
||||
gtk_window_paint (widget, &event->area);
|
||||
|
||||
if (GTK_WIDGET_CLASS (parent_class)->expose_event)
|
||||
@ -1647,7 +1647,7 @@ static void
|
||||
gtk_window_draw (GtkWidget *widget,
|
||||
GdkRectangle *area)
|
||||
{
|
||||
if (!GTK_WIDGET_USER_DRAW (widget))
|
||||
if (!GTK_WIDGET_APP_PAINTABLE (widget))
|
||||
gtk_window_paint (widget, area);
|
||||
|
||||
if (GTK_WIDGET_CLASS (parent_class)->draw)
|
||||
|
Loading…
Reference in New Issue
Block a user