mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
Initialize DOUBLE_BUFFERED flag to on.
Fri Jun 2 12:56:01 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkwidget.c (gtk_widget_init): Initialize DOUBLE_BUFFERED flag to on. * gtk/gtkwidget.c (gtk_widget_draw) gtk/gtkmain.c (gtk_main_do_event): Honor DOUBLE_BUFFRED_FLAG * gtk/gtkwidget.c (gtk_widget_set_double_buffered): Add a function to set the DOUBLE_BUFFERED flag. * gtk/gtkwidget.h: Add GTK_DOUBLE_BUFFERED flag to indicate whether or not exposes done on the widget should be double-buffered. * gtk/gtkenums.h (GtkTextDirection): Reverse order of enumerations to be what would be expected. (Fixes problem with a g_return_if_fail() validating a TextDirection enumeration)
This commit is contained in:
parent
9ae724bf4d
commit
bb77f4e6b9
18
ChangeLog
18
ChangeLog
@ -1,3 +1,21 @@
|
||||
Fri Jun 2 12:56:01 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_init): Initialize DOUBLE_BUFFERED
|
||||
flag to on.
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_draw) gtk/gtkmain.c (gtk_main_do_event):
|
||||
Honor DOUBLE_BUFFRED_FLAG
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_set_double_buffered): Add a
|
||||
function to set the DOUBLE_BUFFERED flag.
|
||||
|
||||
* gtk/gtkwidget.h: Add GTK_DOUBLE_BUFFERED flag to indicate whether
|
||||
or not exposes done on the widget should be double-buffered.
|
||||
|
||||
* gtk/gtkenums.h (GtkTextDirection): Reverse order of enumerations
|
||||
to be what would be expected. (Fixes problem with a
|
||||
g_return_if_fail() validating a TextDirection enumeration)
|
||||
|
||||
Thu Jun 1 23:05:13 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c: Remove all references to
|
||||
|
@ -1,3 +1,21 @@
|
||||
Fri Jun 2 12:56:01 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_init): Initialize DOUBLE_BUFFERED
|
||||
flag to on.
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_draw) gtk/gtkmain.c (gtk_main_do_event):
|
||||
Honor DOUBLE_BUFFRED_FLAG
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_set_double_buffered): Add a
|
||||
function to set the DOUBLE_BUFFERED flag.
|
||||
|
||||
* gtk/gtkwidget.h: Add GTK_DOUBLE_BUFFERED flag to indicate whether
|
||||
or not exposes done on the widget should be double-buffered.
|
||||
|
||||
* gtk/gtkenums.h (GtkTextDirection): Reverse order of enumerations
|
||||
to be what would be expected. (Fixes problem with a
|
||||
g_return_if_fail() validating a TextDirection enumeration)
|
||||
|
||||
Thu Jun 1 23:05:13 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c: Remove all references to
|
||||
|
@ -1,3 +1,21 @@
|
||||
Fri Jun 2 12:56:01 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_init): Initialize DOUBLE_BUFFERED
|
||||
flag to on.
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_draw) gtk/gtkmain.c (gtk_main_do_event):
|
||||
Honor DOUBLE_BUFFRED_FLAG
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_set_double_buffered): Add a
|
||||
function to set the DOUBLE_BUFFERED flag.
|
||||
|
||||
* gtk/gtkwidget.h: Add GTK_DOUBLE_BUFFERED flag to indicate whether
|
||||
or not exposes done on the widget should be double-buffered.
|
||||
|
||||
* gtk/gtkenums.h (GtkTextDirection): Reverse order of enumerations
|
||||
to be what would be expected. (Fixes problem with a
|
||||
g_return_if_fail() validating a TextDirection enumeration)
|
||||
|
||||
Thu Jun 1 23:05:13 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c: Remove all references to
|
||||
|
@ -1,3 +1,21 @@
|
||||
Fri Jun 2 12:56:01 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_init): Initialize DOUBLE_BUFFERED
|
||||
flag to on.
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_draw) gtk/gtkmain.c (gtk_main_do_event):
|
||||
Honor DOUBLE_BUFFRED_FLAG
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_set_double_buffered): Add a
|
||||
function to set the DOUBLE_BUFFERED flag.
|
||||
|
||||
* gtk/gtkwidget.h: Add GTK_DOUBLE_BUFFERED flag to indicate whether
|
||||
or not exposes done on the widget should be double-buffered.
|
||||
|
||||
* gtk/gtkenums.h (GtkTextDirection): Reverse order of enumerations
|
||||
to be what would be expected. (Fixes problem with a
|
||||
g_return_if_fail() validating a TextDirection enumeration)
|
||||
|
||||
Thu Jun 1 23:05:13 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c: Remove all references to
|
||||
|
@ -1,3 +1,21 @@
|
||||
Fri Jun 2 12:56:01 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_init): Initialize DOUBLE_BUFFERED
|
||||
flag to on.
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_draw) gtk/gtkmain.c (gtk_main_do_event):
|
||||
Honor DOUBLE_BUFFRED_FLAG
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_set_double_buffered): Add a
|
||||
function to set the DOUBLE_BUFFERED flag.
|
||||
|
||||
* gtk/gtkwidget.h: Add GTK_DOUBLE_BUFFERED flag to indicate whether
|
||||
or not exposes done on the widget should be double-buffered.
|
||||
|
||||
* gtk/gtkenums.h (GtkTextDirection): Reverse order of enumerations
|
||||
to be what would be expected. (Fixes problem with a
|
||||
g_return_if_fail() validating a TextDirection enumeration)
|
||||
|
||||
Thu Jun 1 23:05:13 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c: Remove all references to
|
||||
|
@ -1,3 +1,21 @@
|
||||
Fri Jun 2 12:56:01 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_init): Initialize DOUBLE_BUFFERED
|
||||
flag to on.
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_draw) gtk/gtkmain.c (gtk_main_do_event):
|
||||
Honor DOUBLE_BUFFRED_FLAG
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_set_double_buffered): Add a
|
||||
function to set the DOUBLE_BUFFERED flag.
|
||||
|
||||
* gtk/gtkwidget.h: Add GTK_DOUBLE_BUFFERED flag to indicate whether
|
||||
or not exposes done on the widget should be double-buffered.
|
||||
|
||||
* gtk/gtkenums.h (GtkTextDirection): Reverse order of enumerations
|
||||
to be what would be expected. (Fixes problem with a
|
||||
g_return_if_fail() validating a TextDirection enumeration)
|
||||
|
||||
Thu Jun 1 23:05:13 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c: Remove all references to
|
||||
|
@ -1,3 +1,21 @@
|
||||
Fri Jun 2 12:56:01 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_init): Initialize DOUBLE_BUFFERED
|
||||
flag to on.
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_draw) gtk/gtkmain.c (gtk_main_do_event):
|
||||
Honor DOUBLE_BUFFRED_FLAG
|
||||
|
||||
* gtk/gtkwidget.c (gtk_widget_set_double_buffered): Add a
|
||||
function to set the DOUBLE_BUFFERED flag.
|
||||
|
||||
* gtk/gtkwidget.h: Add GTK_DOUBLE_BUFFERED flag to indicate whether
|
||||
or not exposes done on the widget should be double-buffered.
|
||||
|
||||
* gtk/gtkenums.h (GtkTextDirection): Reverse order of enumerations
|
||||
to be what would be expected. (Fixes problem with a
|
||||
g_return_if_fail() validating a TextDirection enumeration)
|
||||
|
||||
Thu Jun 1 23:05:13 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwidget.c: Remove all references to
|
||||
|
@ -81,8 +81,8 @@ typedef enum
|
||||
typedef enum
|
||||
{
|
||||
GTK_TEXT_DIR_NONE,
|
||||
GTK_TEXT_DIR_RTL,
|
||||
GTK_TEXT_DIR_LTR
|
||||
GTK_TEXT_DIR_LTR,
|
||||
GTK_TEXT_DIR_RTL
|
||||
} GtkTextDirection;
|
||||
|
||||
/* justification for label and maybe other widgets (text?) */
|
||||
|
@ -742,12 +742,12 @@ gtk_main_do_event (GdkEvent *event)
|
||||
break;
|
||||
|
||||
case GDK_EXPOSE:
|
||||
if (event->any.window)
|
||||
if (event->any.window && GTK_WIDGET_DOUBLE_BUFFERED (event_widget))
|
||||
gdk_window_begin_paint_rect (event->any.window, &event->expose.area);
|
||||
|
||||
gtk_widget_event (event_widget, event);
|
||||
|
||||
if (event->any.window)
|
||||
if (event->any.window && GTK_WIDGET_DOUBLE_BUFFERED (event_widget))
|
||||
gdk_window_end_paint (event->any.window);
|
||||
break;
|
||||
|
||||
|
@ -1023,7 +1023,8 @@ gtk_widget_init (GtkWidget *widget)
|
||||
GTK_WIDGET_SET_FLAGS (widget,
|
||||
GTK_SENSITIVE |
|
||||
GTK_PARENT_SENSITIVE |
|
||||
(composite_child_stack ? GTK_COMPOSITE_CHILD : 0));
|
||||
(composite_child_stack ? GTK_COMPOSITE_CHILD : 0) |
|
||||
GTK_DOUBLE_BUFFERED);
|
||||
|
||||
widget->style = gtk_widget_peek_style ();
|
||||
gtk_style_ref (widget->style);
|
||||
@ -1859,7 +1860,7 @@ gtk_widget_draw (GtkWidget *widget,
|
||||
area = &temp_area;
|
||||
}
|
||||
|
||||
if (!GTK_WIDGET_NO_WINDOW (widget))
|
||||
if (!GTK_WIDGET_NO_WINDOW (widget) && GTK_WIDGET_DOUBLE_BUFFERED (widget))
|
||||
{
|
||||
GdkRectangle tmp_area = *area;
|
||||
gint x, y;
|
||||
@ -1876,7 +1877,7 @@ gtk_widget_draw (GtkWidget *widget,
|
||||
|
||||
gtk_signal_emit (GTK_OBJECT (widget), widget_signals[DRAW], area);
|
||||
|
||||
if (!GTK_WIDGET_NO_WINDOW (widget))
|
||||
if (!GTK_WIDGET_NO_WINDOW (widget) && GTK_WIDGET_DOUBLE_BUFFERED (widget))
|
||||
gdk_window_end_paint (widget->window);
|
||||
}
|
||||
}
|
||||
@ -2802,6 +2803,19 @@ gtk_widget_set_app_paintable (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gtk_widget_set_double_buffered (GtkWidget *widget,
|
||||
gboolean double_buffered)
|
||||
{
|
||||
g_return_if_fail (widget != NULL);
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
if (double_buffered)
|
||||
GTK_WIDGET_SET_FLAGS (widget, GTK_DOUBLE_BUFFERED);
|
||||
else
|
||||
GTK_WIDGET_UNSET_FLAGS (widget, GTK_DOUBLE_BUFFERED);
|
||||
}
|
||||
|
||||
/*****************************************
|
||||
* gtk_widget_set_sensitive:
|
||||
*
|
||||
@ -3192,7 +3206,7 @@ gtk_widget_create_pango_context (GtkWidget *widget)
|
||||
PangoContext *context;
|
||||
char *lang, *p;
|
||||
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
|
||||
|
||||
context = gdk_pango_context_get ();
|
||||
|
||||
@ -3232,7 +3246,7 @@ gtk_widget_create_pango_layout (GtkWidget *widget)
|
||||
PangoLayout *layout;
|
||||
PangoContext *context;
|
||||
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
|
||||
|
||||
context = gtk_widget_create_pango_context (widget);
|
||||
layout = pango_layout_new (context);
|
||||
@ -3998,7 +4012,7 @@ GtkTextDirection
|
||||
gtk_widget_get_direction (GtkWidget *widget)
|
||||
{
|
||||
g_return_val_if_fail (widget != NULL, GTK_TEXT_DIR_LTR);
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
g_return_val_if_fail (GTK_IS_WIDGET (widget), GTK_TEXT_DIR_LTR);
|
||||
|
||||
if (GTK_WIDGET_DIRECTION_SET (widget))
|
||||
return GTK_WIDGET_DIRECTION_LTR (widget) ? GTK_TEXT_DIR_LTR : GTK_TEXT_DIR_RTL;
|
||||
|
@ -60,7 +60,8 @@ typedef enum
|
||||
GTK_COMPOSITE_CHILD = 1 << 17,
|
||||
GTK_NO_REPARENT = 1 << 18,
|
||||
GTK_APP_PAINTABLE = 1 << 19,
|
||||
GTK_RECEIVES_DEFAULT = 1 << 20
|
||||
GTK_RECEIVES_DEFAULT = 1 << 20,
|
||||
GTK_DOUBLE_BUFFERED = 1 << 21
|
||||
} GtkWidgetFlags;
|
||||
|
||||
/* Macro for casting a pointer to a GtkWidget or GtkWidgetClass pointer.
|
||||
@ -101,6 +102,7 @@ typedef enum
|
||||
#define GTK_WIDGET_COMPOSITE_CHILD(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_COMPOSITE_CHILD) != 0)
|
||||
#define GTK_WIDGET_APP_PAINTABLE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_APP_PAINTABLE) != 0)
|
||||
#define GTK_WIDGET_RECEIVES_DEFAULT(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_RECEIVES_DEFAULT) != 0)
|
||||
#define GTK_WIDGET_DOUBLE_BUFFERED(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_DOUBLE_BUFFERED) != 0)
|
||||
|
||||
/* Macros for setting and clearing widget flags.
|
||||
*/
|
||||
@ -511,6 +513,8 @@ void gtk_widget_set_sensitive (GtkWidget *widget,
|
||||
gboolean sensitive);
|
||||
void gtk_widget_set_app_paintable (GtkWidget *widget,
|
||||
gboolean app_paintable);
|
||||
void gtk_widget_set_double_buffered (GtkWidget *widget,
|
||||
gboolean double_buffered);
|
||||
void gtk_widget_set_parent (GtkWidget *widget,
|
||||
GtkWidget *parent);
|
||||
void gtk_widget_set_parent_window (GtkWidget *widget,
|
||||
|
Loading…
Reference in New Issue
Block a user