[gtk+] Deprecate widget flag: GTK_WIDGET_DRAWABLE



commit 4f78f70b15f861cca115f578b0f3f4ad3ad087e7
Author: Javier Jardón <jjardon gnome org>
Date:   Thu Jan 7 16:47:35 2010 +0100

    Deprecate widget flag: GTK_WIDGET_DRAWABLE
    
    Use gtk_widget_is_drawable() instead.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=69872

 demos/gtk-demo/offscreen_window.c  |    2 +-
 demos/gtk-demo/offscreen_window2.c |    2 +-
 gtk/gtkaccellabel.c                |    2 +-
 gtk/gtkarrow.c                     |    9 ++++++---
 gtk/gtkassistant.c                 |    8 ++++----
 gtk/gtkbutton.c                    |   13 +++++++------
 gtk/gtkcalendar.c                  |    6 +++---
 gtk/gtkcellview.c                  |    2 +-
 gtk/gtkcheckbutton.c               |   11 ++++++-----
 gtk/gtkcheckmenuitem.c             |    2 +-
 gtk/gtkcolorsel.c                  |    2 +-
 gtk/gtkcombobox.c                  |    2 +-
 gtk/gtkcontainer.c                 |    6 +++---
 gtk/gtkdnd-quartz.c                |    4 ++--
 gtk/gtkdnd.c                       |    4 ++--
 gtk/gtkentry.c                     |   20 +++++++++++---------
 gtk/gtkeventbox.c                  |    2 +-
 gtk/gtkexpander.c                  |    2 +-
 gtk/gtkfilechooserdialog.c         |    2 +-
 gtk/gtkframe.c                     |   13 ++++++++-----
 gtk/gtkhandlebox.c                 |    2 +-
 gtk/gtkhsv.c                       |    2 +-
 gtk/gtkimage.c                     |    2 +-
 gtk/gtklabel.c                     |    8 +++++---
 gtk/gtklistitem.c                  |    2 +-
 gtk/gtkmenu.c                      |    4 ++--
 gtk/gtkmenubar.c                   |    4 ++--
 gtk/gtkmenuitem.c                  |    4 ++--
 gtk/gtkmisc.c                      |   14 ++++++--------
 gtk/gtknotebook.c                  |   16 ++++++++--------
 gtk/gtkprogressbar.c               |    8 ++++----
 gtk/gtkradiobutton.c               |    5 +++--
 gtk/gtkrange.c                     |    4 +++-
 gtk/gtkruler.c                     |   10 +++++-----
 gtk/gtkscrolledwindow.c            |    4 ++--
 gtk/gtkseparator.c                 |    2 +-
 gtk/gtkspinbutton.c                |    4 ++--
 gtk/gtktearoffmenuitem.c           |    2 +-
 gtk/gtktextview.c                  |    2 +-
 gtk/gtktogglebutton.c              |    2 +-
 gtk/gtktoolbar.c                   |    2 +-
 gtk/gtktooltip.c                   |    2 +-
 gtk/gtktreeitem.c                  |    8 ++++----
 gtk/gtkviewport.c                  |    4 ++--
 gtk/gtkwidget.c                    |   12 ++++++------
 gtk/gtkwidget.h                    |    4 ++++
 gtk/tests/filechooser.c            |   12 ++++++------
 modules/other/gail/gailwidget.c    |    2 +-
 modules/other/gail/gailwindow.c    |    2 +-
 tests/gtkoffscreenbox.c            |    2 +-
 tests/testgtk.c                    |    4 ++--
 tests/testoffscreenwindow.c        |    2 +-
 52 files changed, 144 insertions(+), 127 deletions(-)
---
diff --git a/demos/gtk-demo/offscreen_window.c b/demos/gtk-demo/offscreen_window.c
index 32c9c8c..08654c1 100644
--- a/demos/gtk-demo/offscreen_window.c
+++ b/demos/gtk-demo/offscreen_window.c
@@ -466,7 +466,7 @@ gtk_rotated_bin_expose (GtkWidget      *widget,
   gdouble s, c;
   gdouble w, h;
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       if (event->window == widget->window)
         {
diff --git a/demos/gtk-demo/offscreen_window2.c b/demos/gtk-demo/offscreen_window2.c
index 19ca760..c1f8146 100644
--- a/demos/gtk-demo/offscreen_window2.c
+++ b/demos/gtk-demo/offscreen_window2.c
@@ -369,7 +369,7 @@ gtk_mirror_bin_expose (GtkWidget      *widget,
   GtkMirrorBin *bin = GTK_MIRROR_BIN (widget);
   gint width, height;
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       if (event->window == widget->window)
         {
diff --git a/gtk/gtkaccellabel.c b/gtk/gtkaccellabel.c
index 6a4ddd9..56b1a83 100644
--- a/gtk/gtkaccellabel.c
+++ b/gtk/gtkaccellabel.c
@@ -365,7 +365,7 @@ gtk_accel_label_expose_event (GtkWidget      *widget,
 
   direction = gtk_widget_get_direction (widget);
 
-  if (GTK_WIDGET_DRAWABLE (accel_label))
+  if (gtk_widget_is_drawable (widget))
     {
       guint ac_width;
       
diff --git a/gtk/gtkarrow.c b/gtk/gtkarrow.c
index e6fc3dc..22a5870 100644
--- a/gtk/gtkarrow.c
+++ b/gtk/gtkarrow.c
@@ -174,6 +174,8 @@ gtk_arrow_set (GtkArrow      *arrow,
 	       GtkArrowType   arrow_type,
 	       GtkShadowType  shadow_type)
 {
+  GtkWidget *widget;
+
   g_return_if_fail (GTK_IS_ARROW (arrow));
 
   if (   ((GtkArrowType) arrow->arrow_type != arrow_type)
@@ -195,8 +197,9 @@ gtk_arrow_set (GtkArrow      *arrow,
 
       g_object_thaw_notify (G_OBJECT (arrow));
 
-      if (GTK_WIDGET_DRAWABLE (arrow))
-	gtk_widget_queue_draw (GTK_WIDGET (arrow));
+      widget = GTK_WIDGET (arrow);
+      if (gtk_widget_is_drawable (widget))
+	gtk_widget_queue_draw (widget);
     }
 }
 
@@ -205,7 +208,7 @@ static gboolean
 gtk_arrow_expose (GtkWidget      *widget,
 		  GdkEventExpose *event)
 {
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       GtkArrow *arrow = GTK_ARROW (widget);
       GtkMisc *misc = GTK_MISC (widget);
diff --git a/gtk/gtkassistant.c b/gtk/gtkassistant.c
index 5fd6d83..a1a6365 100644
--- a/gtk/gtkassistant.c
+++ b/gtk/gtkassistant.c
@@ -558,7 +558,7 @@ set_current_page (GtkAssistant     *assistant,
   GtkAssistantPage *old_page;
 
   if (priv->current_page &&
-      GTK_WIDGET_DRAWABLE (priv->current_page->page))
+      gtk_widget_is_drawable (priv->current_page->page))
     old_page = priv->current_page;
   else
     old_page = NULL;
@@ -1276,11 +1276,11 @@ gtk_assistant_unmap (GtkWidget *widget)
   gtk_widget_unmap (priv->header_image);
   gtk_widget_unmap (priv->action_area);
 
-  if (GTK_WIDGET_DRAWABLE (priv->sidebar_image))
+  if (gtk_widget_is_drawable (priv->sidebar_image))
     gtk_widget_unmap (priv->sidebar_image);
 
   if (priv->current_page &&
-      GTK_WIDGET_DRAWABLE (priv->current_page->page))
+      gtk_widget_is_drawable (priv->current_page->page))
     gtk_widget_unmap (priv->current_page->page);
 
   g_slist_free (priv->visited_pages);
@@ -1366,7 +1366,7 @@ gtk_assistant_expose (GtkWidget      *widget,
   GtkAssistantPrivate *priv = assistant->priv;
   GtkContainer *container;
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       container = GTK_CONTAINER (widget);
 
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index d776b6b..3c6f17b 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -1471,14 +1471,15 @@ _gtk_button_paint (GtkButton          *button,
   gboolean interior_focus;
   gint focus_width;
   gint focus_pad;
-   
-  if (GTK_WIDGET_DRAWABLE (button))
+
+  widget = GTK_WIDGET (button);
+
+  if (gtk_widget_is_drawable (widget))
     {
-      widget = GTK_WIDGET (button);
       border_width = GTK_CONTAINER (widget)->border_width;
 
       gtk_button_get_props (button, &default_border, &default_outside_border, NULL, &interior_focus);
-      gtk_widget_style_get (GTK_WIDGET (widget),
+      gtk_widget_style_get (widget,
 			    "focus-line-width", &focus_width,
 			    "focus-padding", &focus_pad,
 			    NULL); 
@@ -1530,7 +1531,7 @@ _gtk_button_paint (GtkButton          *button,
 	  gint child_displacement_y;
 	  gboolean displace_focus;
 	  
-	  gtk_widget_style_get (GTK_WIDGET (widget),
+	  gtk_widget_style_get (widget,
 				"child-displacement-y", &child_displacement_y,
 				"child-displacement-x", &child_displacement_x,
 				"displace-focus", &displace_focus,
@@ -1568,7 +1569,7 @@ static gboolean
 gtk_button_expose (GtkWidget      *widget,
 		   GdkEventExpose *event)
 {
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       GtkButton *button = GTK_BUTTON (widget);
       
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index 7203f15..025860c 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -2666,7 +2666,7 @@ gtk_calendar_expose (GtkWidget	    *widget,
   GtkCalendarPrivate *priv = GTK_CALENDAR_GET_PRIVATE (widget);
   int i;
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       if (event->window == priv->main_win)
 	calendar_paint_main (calendar);
@@ -3728,7 +3728,7 @@ gtk_calendar_select_day (GtkCalendar *calendar,
       
       selected_day = calendar->selected_day;
       calendar->selected_day = 0;
-      if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar)))
+      if (gtk_widget_is_drawable (GTK_WIDGET (calendar)))
 	calendar_invalidate_day_num (calendar, selected_day);
     }
   
@@ -3737,7 +3737,7 @@ gtk_calendar_select_day (GtkCalendar *calendar,
   /* Select the new day */
   if (day != 0)
     {
-      if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (calendar)))
+      if (gtk_widget_is_drawable (GTK_WIDGET (calendar)))
 	calendar_invalidate_day_num (calendar, day);
     }
   
diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c
index 7704495..34f3241 100644
--- a/gtk/gtkcellview.c
+++ b/gtk/gtkcellview.c
@@ -405,7 +405,7 @@ gtk_cell_view_expose (GtkWidget      *widget,
 
   cellview = GTK_CELL_VIEW (widget);
 
-  if (! GTK_WIDGET_DRAWABLE (widget))
+  if (!gtk_widget_is_drawable (widget))
     return FALSE;
 
   /* "blank" background */
diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c
index 92d82f2..6d15a05 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -133,7 +133,7 @@ gtk_check_button_paint (GtkWidget    *widget,
 {
   GtkCheckButton *check_button = GTK_CHECK_BUTTON (widget);
   
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       gint border_width;
       gint interior_focus;
@@ -307,7 +307,7 @@ gtk_check_button_expose (GtkWidget      *widget,
   toggle_button = GTK_TOGGLE_BUTTON (widget);
   bin = GTK_BIN (widget);
   
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       if (toggle_button->draw_indicator)
 	{
@@ -356,10 +356,11 @@ gtk_real_check_button_draw_indicator (GtkCheckButton *check_button,
   gint focus_width;
   gint focus_pad;
   gboolean interior_focus;
-  
-  if (GTK_WIDGET_DRAWABLE (check_button))
+
+  widget = GTK_WIDGET (check_button);
+
+  if (gtk_widget_is_drawable (widget))
     {
-      widget = GTK_WIDGET (check_button);
       button = GTK_BUTTON (check_button);
       toggle_button = GTK_TOGGLE_BUTTON (check_button);
   
diff --git a/gtk/gtkcheckmenuitem.c b/gtk/gtkcheckmenuitem.c
index 8bf0972..4fb18c8 100644
--- a/gtk/gtkcheckmenuitem.c
+++ b/gtk/gtkcheckmenuitem.c
@@ -441,7 +441,7 @@ gtk_real_check_menu_item_draw_indicator (GtkCheckMenuItem *check_menu_item,
   GtkShadowType shadow_type;
   gint x, y;
 
-  if (GTK_WIDGET_DRAWABLE (check_menu_item))
+  if (gtk_widget_is_drawable (GTK_WIDGET (check_menu_item)))
     {
       guint offset;
       guint toggle_size;
diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c
index 2a8ca74..413b4cf 100644
--- a/gtk/gtkcolorsel.c
+++ b/gtk/gtkcolorsel.c
@@ -814,7 +814,7 @@ color_sample_draw_sample (GtkColorSelection *colorsel, int which)
   priv = colorsel->private_data;
   
   g_return_if_fail (priv->sample_area != NULL);
-  if (!GTK_WIDGET_DRAWABLE (priv->sample_area))
+  if (!gtk_widget_is_drawable (priv->sample_area))
     return;
 
   if (which == 0)
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 529a4a5..26da1cd 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -2512,7 +2512,7 @@ gtk_combo_box_expose_event (GtkWidget      *widget,
   GtkComboBox *combo_box = GTK_COMBO_BOX (widget);
   GtkComboBoxPrivate *priv = combo_box->priv;
 
-  if (GTK_WIDGET_DRAWABLE (widget) &&
+  if (gtk_widget_is_drawable (widget) &&
       GTK_SHADOW_NONE != priv->shadow_type)
     {
       gtk_paint_shadow (widget->style, widget->window,
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index f5a169c..f66b05c 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -2301,7 +2301,7 @@ gtk_container_focus_move (GtkContainer     *container,
 		  return TRUE;
             }
         }
-      else if (GTK_WIDGET_DRAWABLE (child) &&
+      else if (gtk_widget_is_drawable (child) &&
                gtk_widget_is_ancestor (child, GTK_WIDGET (container)))
         {
           if (gtk_widget_child_focus (child, direction))
@@ -2638,7 +2638,7 @@ gtk_container_expose (GtkWidget      *widget,
   g_return_val_if_fail (event != NULL, FALSE);
 
   
-  if (GTK_WIDGET_DRAWABLE (widget)) 
+  if (gtk_widget_is_drawable (widget))
     {
       data.container = widget;
       data.event = event;
@@ -2720,7 +2720,7 @@ gtk_container_propagate_expose (GtkContainer   *container,
 
   g_assert (child->parent == GTK_WIDGET (container));
   
-  if (GTK_WIDGET_DRAWABLE (child) &&
+  if (gtk_widget_is_drawable (child) &&
       !gtk_widget_get_has_window (child) &&
       (child->window == event->window))
     {
diff --git a/gtk/gtkdnd-quartz.c b/gtk/gtkdnd-quartz.c
index 6c5a5ae..3d5a643 100644
--- a/gtk/gtkdnd-quartz.c
+++ b/gtk/gtkdnd-quartz.c
@@ -353,7 +353,7 @@ gtk_drag_highlight_expose (GtkWidget      *widget,
 {
   gint x, y, width, height;
   
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       cairo_t *cr;
       
@@ -757,7 +757,7 @@ gtk_drag_find_widget (GtkWidget       *widget,
 	  gtk_container_forall (GTK_CONTAINER (widget), prepend_and_ref_widget, &children);
 	  for (tmp_list = children; tmp_list; tmp_list = tmp_list->next)
 	    {
-	      if (!new_data.found && GTK_WIDGET_DRAWABLE (tmp_list->data))
+	      if (!new_data.found && gtk_widget_is_drawable (tmp_list->data))
 		gtk_drag_find_widget (tmp_list->data, &new_data);
 	      g_object_unref (tmp_list->data);
 	    }
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 878dbf5..8146cdd 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -1102,7 +1102,7 @@ gtk_drag_highlight_expose (GtkWidget      *widget,
 {
   gint x, y, width, height;
   
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       cairo_t *cr;
       
@@ -1934,7 +1934,7 @@ gtk_drag_find_widget (GtkWidget       *widget,
 	  gtk_container_forall (GTK_CONTAINER (widget), prepend_and_ref_widget, &children);
 	  for (tmp_list = children; tmp_list; tmp_list = tmp_list->next)
 	    {
-	      if (!new_data.found && GTK_WIDGET_DRAWABLE (tmp_list->data))
+	      if (!new_data.found && gtk_widget_is_drawable (tmp_list->data))
 		gtk_drag_find_widget (tmp_list->data, &new_data);
 	      g_object_unref (tmp_list->data);
 	    }
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 6142190..5129943 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -5579,7 +5579,7 @@ gtk_entry_draw_text (GtkEntry *entry)
   if (gtk_entry_get_display_mode (entry) == DISPLAY_BLANK)
     return;
   
-  if (GTK_WIDGET_DRAWABLE (entry))
+  if (gtk_widget_is_drawable (widget))
     {
       GdkColor text_color, bar_text_color;
       gint pos_x, pos_y;
@@ -5664,12 +5664,12 @@ static void
 gtk_entry_draw_cursor (GtkEntry  *entry,
 		       CursorType type)
 {
+  GtkWidget *widget = GTK_WIDGET (entry);
   GdkKeymap *keymap = gdk_keymap_get_for_display (gtk_widget_get_display (GTK_WIDGET (entry)));
   PangoDirection keymap_direction = gdk_keymap_get_direction (keymap);
   
-  if (GTK_WIDGET_DRAWABLE (entry))
+  if (gtk_widget_is_drawable (widget))
     {
-      GtkWidget *widget = GTK_WIDGET (entry);
       GdkRectangle cursor_location;
       gboolean split_cursor;
       PangoRectangle cursor_rect;
@@ -5786,7 +5786,7 @@ gtk_entry_draw_cursor (GtkEntry  *entry,
 static void
 gtk_entry_queue_draw (GtkEntry *entry)
 {
-  if (GTK_WIDGET_DRAWABLE (entry))
+  if (gtk_widget_is_drawable (GTK_WIDGET (entry)))
     gdk_window_invalidate_rect (entry->text_area, NULL, FALSE);
 }
 
@@ -9856,6 +9856,7 @@ void
 gtk_entry_set_progress_fraction (GtkEntry *entry,
                                  gdouble   fraction)
 {
+  GtkWidget       *widget;
   GtkEntryPrivate *private;
   gdouble          old_fraction;
   gint x, y, width, height;
@@ -9863,6 +9864,7 @@ gtk_entry_set_progress_fraction (GtkEntry *entry,
 
   g_return_if_fail (GTK_IS_ENTRY (entry));
 
+  widget = GTK_WIDGET (entry);
   private = GTK_ENTRY_GET_PRIVATE (entry);
 
   if (private->progress_pulse_mode)
@@ -9870,8 +9872,8 @@ gtk_entry_set_progress_fraction (GtkEntry *entry,
   else
     old_fraction = private->progress_fraction;
 
-  if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (entry)))
-    get_progress_area (GTK_WIDGET(entry), &old_x, &old_y, &old_width, &old_height);
+  if (gtk_widget_is_drawable (widget))
+    get_progress_area (widget, &old_x, &old_y, &old_width, &old_height);
 
   fraction = CLAMP (fraction, 0.0, 1.0);
 
@@ -9879,12 +9881,12 @@ gtk_entry_set_progress_fraction (GtkEntry *entry,
   private->progress_pulse_mode = FALSE;
   private->progress_pulse_current = 0.0;
 
-  if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (entry)))
+  if (gtk_widget_is_drawable (widget))
     {
-      get_progress_area (GTK_WIDGET(entry), &x, &y, &width, &height);
+      get_progress_area (widget, &x, &y, &width, &height);
 
       if ((x != old_x) || (y != old_y) || (width != old_width) || (height != old_height))
-        gtk_widget_queue_draw (GTK_WIDGET (entry));
+        gtk_widget_queue_draw (widget);
     }
 
   if (fraction != old_fraction)
diff --git a/gtk/gtkeventbox.c b/gtk/gtkeventbox.c
index b1a5035..9c8f6ff 100644
--- a/gtk/gtkeventbox.c
+++ b/gtk/gtkeventbox.c
@@ -560,7 +560,7 @@ static gboolean
 gtk_event_box_expose (GtkWidget      *widget,
 		     GdkEventExpose *event)
 {
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       if (gtk_widget_get_has_window (widget))
 	gtk_event_box_paint (widget, &event->area);
diff --git a/gtk/gtkexpander.c b/gtk/gtkexpander.c
index 2341123..546a552 100644
--- a/gtk/gtkexpander.c
+++ b/gtk/gtkexpander.c
@@ -897,7 +897,7 @@ static gboolean
 gtk_expander_expose (GtkWidget      *widget,
 		     GdkEventExpose *event)
 {
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       GtkExpander *expander = GTK_EXPANDER (widget);
 
diff --git a/gtk/gtkfilechooserdialog.c b/gtk/gtkfilechooserdialog.c
index e88e361..11b6dea 100644
--- a/gtk/gtkfilechooserdialog.c
+++ b/gtk/gtkfilechooserdialog.c
@@ -187,7 +187,7 @@ file_chooser_widget_default_size_changed (GtkWidget            *widget,
   /* Unset any previously set size */
   gtk_widget_set_size_request (GTK_WIDGET (dialog), -1, -1);
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       /* Force a size request of everything before we start.  This will make sure
        * that widget->requisition is meaningful. */
diff --git a/gtk/gtkframe.c b/gtk/gtkframe.c
index d8a637b..7e1b722 100644
--- a/gtk/gtkframe.c
+++ b/gtk/gtkframe.c
@@ -492,19 +492,22 @@ void
 gtk_frame_set_shadow_type (GtkFrame      *frame,
 			   GtkShadowType  type)
 {
+  GtkWidget *widget;
+
   g_return_if_fail (GTK_IS_FRAME (frame));
 
   if ((GtkShadowType) frame->shadow_type != type)
     {
+      widget = GTK_WIDGET (frame);
       frame->shadow_type = type;
       g_object_notify (G_OBJECT (frame), "shadow-type");
 
-      if (GTK_WIDGET_DRAWABLE (frame))
+      if (gtk_widget_is_drawable (widget))
 	{
-	  gtk_widget_queue_draw (GTK_WIDGET (frame));
+	  gtk_widget_queue_draw (widget);
 	}
       
-      gtk_widget_queue_resize (GTK_WIDGET (frame));
+      gtk_widget_queue_resize (widget);
     }
 }
 
@@ -532,7 +535,7 @@ gtk_frame_paint (GtkWidget    *widget,
   GtkFrame *frame;
   gint x, y, width, height;
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       frame = GTK_FRAME (widget);
 
@@ -588,7 +591,7 @@ static gboolean
 gtk_frame_expose (GtkWidget      *widget,
 		  GdkEventExpose *event)
 {
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       gtk_frame_paint (widget, &event->area);
 
diff --git a/gtk/gtkhandlebox.c b/gtk/gtkhandlebox.c
index e56d78b..7a25be7 100644
--- a/gtk/gtkhandlebox.c
+++ b/gtk/gtkhandlebox.c
@@ -961,7 +961,7 @@ gtk_handle_box_expose (GtkWidget      *widget,
 {
   GtkHandleBox *hb;
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       hb = GTK_HANDLE_BOX (widget);
 
diff --git a/gtk/gtkhsv.c b/gtk/gtkhsv.c
index ed8b44f..10db08b 100644
--- a/gtk/gtkhsv.c
+++ b/gtk/gtkhsv.c
@@ -1271,7 +1271,7 @@ gtk_hsv_expose (GtkWidget      *widget,
   hsv = GTK_HSV (widget);
   priv = hsv->priv;
   
-  if (!(GTK_WIDGET_DRAWABLE (widget) && event->window == widget->window))
+  if (!(event->window == widget->window && gtk_widget_is_drawable (widget)))
     return FALSE;
 
   rect.x = widget->allocation.x;
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index bcd0a0a..8b9a9d5 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -1618,7 +1618,7 @@ animation_timeout (gpointer data)
 
       gtk_widget_queue_draw (GTK_WIDGET (image));
 
-      if (GTK_WIDGET_DRAWABLE (image))
+      if (gtk_widget_is_drawable (GTK_WIDGET (image)))
         gdk_window_process_updates (GTK_WIDGET (image)->window, TRUE);
     }
 
diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c
index 9408de1..28a76fd 100644
--- a/gtk/gtklabel.c
+++ b/gtk/gtklabel.c
@@ -3449,13 +3449,15 @@ get_cursor_direction (GtkLabel *label)
 static void
 gtk_label_draw_cursor (GtkLabel  *label, gint xoffset, gint yoffset)
 {
+  GtkWidget *widget;
+
   if (label->select_info == NULL)
     return;
+
+  widget = GTK_WIDGET (label);
   
-  if (GTK_WIDGET_DRAWABLE (label))
+  if (gtk_widget_is_drawable (widget))
     {
-      GtkWidget *widget = GTK_WIDGET (label);
-
       PangoDirection keymap_direction;
       PangoDirection cursor_direction;
       PangoRectangle strong_pos, weak_pos;
diff --git a/gtk/gtklistitem.c b/gtk/gtklistitem.c
index f3aa6a1..cfa3685 100644
--- a/gtk/gtklistitem.c
+++ b/gtk/gtklistitem.c
@@ -549,7 +549,7 @@ gtk_list_item_expose (GtkWidget      *widget,
 {
   g_return_val_if_fail (widget != NULL, FALSE);
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       if (widget->state == GTK_STATE_NORMAL)
         {
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index bbbe4c0..31e92c3 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -1905,7 +1905,7 @@ gtk_menu_reposition (GtkMenu *menu)
 {
   g_return_if_fail (GTK_IS_MENU (menu));
 
-  if (GTK_WIDGET_DRAWABLE (menu) && !menu->torn_off)
+  if (!menu->torn_off && gtk_widget_is_drawable (GTK_WIDGET (menu)))
     gtk_menu_position (menu);
 }
 
@@ -2867,7 +2867,7 @@ gtk_menu_expose (GtkWidget	*widget,
   g_return_val_if_fail (GTK_IS_MENU (widget), FALSE);
   g_return_val_if_fail (event != NULL, FALSE);
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       gtk_menu_paint (widget, event);
 
diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c
index d051e3b..1d0f43c 100644
--- a/gtk/gtkmenubar.c
+++ b/gtk/gtkmenubar.c
@@ -509,7 +509,7 @@ gtk_menu_bar_paint (GtkWidget    *widget,
 {
   g_return_if_fail (GTK_IS_MENU_BAR (widget));
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       gint border;
 
@@ -533,7 +533,7 @@ gtk_menu_bar_expose (GtkWidget      *widget,
   g_return_val_if_fail (GTK_IS_MENU_BAR (widget), FALSE);
   g_return_val_if_fail (event != NULL, FALSE);
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       gtk_menu_bar_paint (widget, &event->area);
 
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index cafddb5..8888834 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -1197,7 +1197,7 @@ gtk_menu_item_paint (GtkWidget    *widget,
   gint x, y;
   gint border_width = GTK_CONTAINER (widget)->border_width;
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       menu_item = GTK_MENU_ITEM (widget);
 
@@ -1318,7 +1318,7 @@ gtk_menu_item_expose (GtkWidget      *widget,
   g_return_val_if_fail (GTK_IS_MENU_ITEM (widget), FALSE);
   g_return_val_if_fail (event != NULL, FALSE);
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       gtk_menu_item_paint (widget, &event->area);
 
diff --git a/gtk/gtkmisc.c b/gtk/gtkmisc.c
index 2d102a5..e625f38 100644
--- a/gtk/gtkmisc.c
+++ b/gtk/gtkmisc.c
@@ -182,6 +182,8 @@ gtk_misc_set_alignment (GtkMisc *misc,
 			gfloat   xalign,
 			gfloat   yalign)
 {
+  GtkWidget *widget;
+
   g_return_if_fail (GTK_IS_MISC (misc));
 
   if (xalign < 0.0)
@@ -208,13 +210,9 @@ gtk_misc_set_alignment (GtkMisc *misc,
       
       /* clear the area that was allocated before the change
        */
-      if (GTK_WIDGET_DRAWABLE (misc))
-        {
-          GtkWidget *widget;
-	  
-          widget = GTK_WIDGET (misc);
-          gtk_widget_queue_draw (widget);
-        }
+      widget = GTK_WIDGET (misc);
+      if (gtk_widget_is_drawable (widget))
+        gtk_widget_queue_draw (widget);
 
       g_object_thaw_notify (G_OBJECT (misc));
     }
@@ -275,7 +273,7 @@ gtk_misc_set_padding (GtkMisc *misc,
       requisition->width += misc->xpad * 2;
       requisition->height += misc->ypad * 2;
       
-      if (GTK_WIDGET_DRAWABLE (misc))
+      if (gtk_widget_is_drawable (GTK_WIDGET (misc)))
 	gtk_widget_queue_resize (GTK_WIDGET (misc));
 
       g_object_thaw_notify (G_OBJECT (misc));
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 392afed..f86af0e 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -2311,7 +2311,7 @@ gtk_notebook_expose (GtkWidget      *widget,
       gtk_container_propagate_expose (GTK_CONTAINER (notebook),
 				      notebook->cur_page->tab_label, event);
     }
-  else if (GTK_WIDGET_DRAWABLE (widget))
+  else if (gtk_widget_is_drawable (widget))
     {
       gtk_notebook_paint (widget, &event->area);
       if (notebook->show_tabs)
@@ -2328,7 +2328,7 @@ gtk_notebook_expose (GtkWidget      *widget,
 	      pages = pages->next;
 
 	      if (page->tab_label->window == event->window &&
-		  GTK_WIDGET_DRAWABLE (page->tab_label))
+		  gtk_widget_is_drawable (page->tab_label))
 		gtk_container_propagate_expose (GTK_CONTAINER (notebook),
 						page->tab_label, event);
 	    }
@@ -2343,7 +2343,7 @@ gtk_notebook_expose (GtkWidget      *widget,
         for (i = 0; i < N_ACTION_WIDGETS; i++)
         {
           if (priv->action_widget[i] &&
-              GTK_WIDGET_DRAWABLE (priv->action_widget[i]))
+              gtk_widget_is_drawable (priv->action_widget[i]))
             gtk_container_propagate_expose (GTK_CONTAINER (notebook),
                                             priv->action_widget[i], event);
         }
@@ -3272,7 +3272,7 @@ gtk_notebook_draw_focus (GtkWidget      *widget,
 {
   GtkNotebook *notebook = GTK_NOTEBOOK (widget);
 
-  if (GTK_WIDGET_HAS_FOCUS (widget) && GTK_WIDGET_DRAWABLE (widget) &&
+  if (GTK_WIDGET_HAS_FOCUS (widget) && gtk_widget_is_drawable (widget) &&
       notebook->show_tabs && notebook->cur_page &&
       notebook->cur_page->tab_label->window == event->window)
     {
@@ -4837,7 +4837,7 @@ gtk_notebook_paint (GtkWidget    *widget,
   gboolean is_rtl;
   gint tab_pos;
    
-  if (!GTK_WIDGET_DRAWABLE (widget))
+  if (!gtk_widget_is_drawable (widget))
     return;
 
   notebook = GTK_NOTEBOOK (widget);
@@ -5014,7 +5014,9 @@ gtk_notebook_draw_arrow (GtkNotebook      *notebook,
   GtkArrowType arrow;
   gboolean is_rtl, left;
 
-  if (GTK_WIDGET_DRAWABLE (notebook))
+  widget = GTK_WIDGET (notebook);
+
+  if (gtk_widget_is_drawable (widget))
     {
       gint scroll_arrow_hlength;
       gint scroll_arrow_vlength;
@@ -5022,8 +5024,6 @@ gtk_notebook_draw_arrow (GtkNotebook      *notebook,
 
       gtk_notebook_get_arrow_rect (notebook, &arrow_rect, nbarrow);
 
-      widget = GTK_WIDGET (notebook);
-
       is_rtl = gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
       left = (ARROW_IS_LEFT (nbarrow) && !is_rtl) ||
              (!ARROW_IS_LEFT (nbarrow) && is_rtl); 
diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c
index e5f5554..798c6b4 100644
--- a/gtk/gtkprogressbar.c
+++ b/gtk/gtkprogressbar.c
@@ -531,7 +531,7 @@ gtk_progress_bar_expose (GtkWidget      *widget,
 
   pbar = GTK_PROGRESS_BAR (widget);
 
-  if (GTK_WIDGET_DRAWABLE (widget) && pbar->dirty)
+  if (pbar->dirty && gtk_widget_is_drawable (widget))
     gtk_progress_bar_paint (GTK_PROGRESS (pbar));
 
   return GTK_WIDGET_CLASS (gtk_progress_bar_parent_class)->expose_event (widget, event);
@@ -1048,7 +1048,7 @@ gtk_progress_bar_set_bar_style_internal (GtkProgressBar     *pbar,
     {
       pbar->bar_style = bar_style;
 
-      if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (pbar)))
+      if (gtk_widget_is_drawable (GTK_WIDGET (pbar)))
 	gtk_widget_queue_resize (GTK_WIDGET (pbar));
 
       g_object_notify (G_OBJECT (pbar), "bar-style");
@@ -1066,7 +1066,7 @@ gtk_progress_bar_set_discrete_blocks_internal (GtkProgressBar *pbar,
     {
       pbar->blocks = blocks;
 
-      if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (pbar)))
+      if (gtk_widget_is_drawable (GTK_WIDGET (pbar)))
 	gtk_widget_queue_resize (GTK_WIDGET (pbar));
 
       g_object_notify (G_OBJECT (pbar), "discrete-blocks");
@@ -1227,7 +1227,7 @@ gtk_progress_bar_set_orientation (GtkProgressBar           *pbar,
     {
       pbar->orientation = orientation;
 
-      if (GTK_WIDGET_DRAWABLE (GTK_WIDGET (pbar)))
+      if (gtk_widget_is_drawable (GTK_WIDGET (pbar)))
 	gtk_widget_queue_resize (GTK_WIDGET (pbar));
 
       g_object_notify (G_OBJECT (pbar), "orientation");
diff --git a/gtk/gtkradiobutton.c b/gtk/gtkradiobutton.c
index 5916378..503fdb0 100644
--- a/gtk/gtkradiobutton.c
+++ b/gtk/gtkradiobutton.c
@@ -686,9 +686,10 @@ gtk_radio_button_draw_indicator (GtkCheckButton *check_button,
   gint focus_pad;
   gboolean interior_focus;
 
-  if (GTK_WIDGET_DRAWABLE (check_button))
+  widget = GTK_WIDGET (check_button);
+
+  if (gtk_widget_is_drawable (widget))
     {
-      widget = GTK_WIDGET (check_button);
       button = GTK_BUTTON (check_button);
       toggle_button = GTK_TOGGLE_BUTTON (check_button);
 
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index 7c361e7..5059a24 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -2599,9 +2599,11 @@ static gboolean
 force_repaint (gpointer data)
 {
   GtkRange *range = GTK_RANGE (data);
+
   range->layout->repaint_id = 0;
-  if (GTK_WIDGET_DRAWABLE (range))
+  if (gtk_widget_is_drawable (GTK_WIDGET (range)))
     gdk_window_process_updates (GTK_WIDGET (range)->window, FALSE);
+
   return FALSE;
 }
 
diff --git a/gtk/gtkruler.c b/gtk/gtkruler.c
index 6e581ae..ac3907a 100644
--- a/gtk/gtkruler.c
+++ b/gtk/gtkruler.c
@@ -306,7 +306,7 @@ gtk_ruler_set_metric (GtkRuler      *ruler,
 
   ruler->metric = (GtkRulerMetric *) &ruler_metrics[metric];
 
-  if (GTK_WIDGET_DRAWABLE (ruler))
+  if (gtk_widget_is_drawable (GTK_WIDGET (ruler)))
     gtk_widget_queue_draw (GTK_WIDGET (ruler));
 
   g_object_notify (G_OBJECT (ruler), "metric");
@@ -379,7 +379,7 @@ gtk_ruler_set_range (GtkRuler *ruler,
     }
   g_object_thaw_notify (G_OBJECT (ruler));
 
-  if (GTK_WIDGET_DRAWABLE (ruler))
+  if (gtk_widget_is_drawable (GTK_WIDGET (ruler)))
     gtk_widget_queue_draw (GTK_WIDGET (ruler));
 }
 
@@ -554,7 +554,7 @@ static gboolean
 gtk_ruler_expose (GtkWidget      *widget,
 		  GdkEventExpose *event)
 {
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       GtkRuler *ruler = GTK_RULER (widget);
 
@@ -632,7 +632,7 @@ gtk_ruler_real_draw_ticks (GtkRuler *ruler)
   PangoLayout *layout;
   PangoRectangle logical_rect, ink_rect;
 
-  if (!GTK_WIDGET_DRAWABLE (ruler))
+  if (!gtk_widget_is_drawable (widget))
     return;
 
   xthickness = widget->style->xthickness;
@@ -833,7 +833,7 @@ gtk_ruler_real_draw_pos (GtkRuler *ruler)
   gint ythickness;
   gdouble increment;
 
-  if (GTK_WIDGET_DRAWABLE (ruler))
+  if (gtk_widget_is_drawable (widget))
     {
       xthickness = widget->style->xthickness;
       ythickness = widget->style->ythickness;
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 75b4121..8006fb6 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -819,7 +819,7 @@ gtk_scrolled_window_set_shadow_type (GtkScrolledWindow *scrolled_window,
     {
       scrolled_window->shadow_type = type;
 
-      if (GTK_WIDGET_DRAWABLE (scrolled_window))
+      if (gtk_widget_is_drawable (GTK_WIDGET (scrolled_window)))
 	gtk_widget_queue_draw (GTK_WIDGET (scrolled_window));
 
       gtk_widget_queue_resize (GTK_WIDGET (scrolled_window));
@@ -1063,7 +1063,7 @@ static gboolean
 gtk_scrolled_window_expose (GtkWidget      *widget,
 			    GdkEventExpose *event)
 {
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       gtk_scrolled_window_paint (widget, &event->area);
 
diff --git a/gtk/gtkseparator.c b/gtk/gtkseparator.c
index 44976a1..f69860c 100644
--- a/gtk/gtkseparator.c
+++ b/gtk/gtkseparator.c
@@ -184,7 +184,7 @@ gtk_separator_expose (GtkWidget      *widget,
   gint     separator_width;
   gint     separator_height;
 
-  if (!GTK_WIDGET_DRAWABLE (widget))
+  if (!gtk_widget_is_drawable (widget))
     return FALSE;
 
   gtk_widget_style_get (widget,
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 8f49194..e9349cd 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -731,7 +731,7 @@ gtk_spin_button_expose (GtkWidget      *widget,
 {
   GtkSpinButton *spin = GTK_SPIN_BUTTON (widget);
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       if (event->window == spin->panel)
 	{
@@ -804,7 +804,7 @@ gtk_spin_button_draw_arrow (GtkSpinButton *spin_button,
 
   widget = GTK_WIDGET (spin_button);
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       width = spin_button_get_arrow_size (spin_button) + 2 * widget->style->xthickness;
 
diff --git a/gtk/gtktearoffmenuitem.c b/gtk/gtktearoffmenuitem.c
index f661520..8bdb3be 100644
--- a/gtk/gtktearoffmenuitem.c
+++ b/gtk/gtktearoffmenuitem.c
@@ -105,7 +105,7 @@ gtk_tearoff_menu_item_paint (GtkWidget   *widget,
   GtkArrowType arrow_type;
   GtkTextDirection direction;
   
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       menu_item = GTK_MENU_ITEM (widget);
 
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 80d356d..703001c 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -4679,7 +4679,7 @@ gtk_text_view_draw_focus (GtkWidget *widget)
 			"interior-focus", &interior_focus,
 			NULL);
   
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       if (GTK_WIDGET_HAS_FOCUS (widget) && !interior_focus)
         {          
diff --git a/gtk/gtktogglebutton.c b/gtk/gtktogglebutton.c
index 3a07cfd..4350d82 100644
--- a/gtk/gtktogglebutton.c
+++ b/gtk/gtktogglebutton.c
@@ -419,7 +419,7 @@ static gint
 gtk_toggle_button_expose (GtkWidget      *widget,
 			  GdkEventExpose *event)
 {
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       GtkWidget *child = GTK_BIN (widget)->child;
       GtkButton *button = GTK_BUTTON (widget);
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index 87e8754..229a5d9 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -867,7 +867,7 @@ gtk_toolbar_expose (GtkWidget      *widget,
   
   border_width = GTK_CONTAINER (widget)->border_width;
   
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       gtk_paint_box (widget->style,
 		     widget->window,
diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c
index 36a9995..c94226c 100644
--- a/gtk/gtktooltip.c
+++ b/gtk/gtktooltip.c
@@ -553,7 +553,7 @@ child_location_foreach (GtkWidget *child,
   struct ChildLocation *child_loc = data;
 
   /* Ignore invisible widgets */
-  if (!GTK_WIDGET_DRAWABLE (child))
+  if (!gtk_widget_is_drawable (child))
     return;
 
   x = 0;
diff --git a/gtk/gtktreeitem.c b/gtk/gtktreeitem.c
index 7b2ae9c..1cc74b0 100644
--- a/gtk/gtktreeitem.c
+++ b/gtk/gtktreeitem.c
@@ -212,7 +212,7 @@ gtk_tree_item_subtree_button_changed_state (GtkWidget *widget)
       else
 	gdk_window_set_background (widget->window, &widget->style->bg[widget->state]);
       
-      if (GTK_WIDGET_DRAWABLE (widget))
+      if (gtk_widget_is_drawable (widget))
 	gdk_window_clear_area (widget->window, 0, 0, 
 			       widget->allocation.width, widget->allocation.height);
     }
@@ -603,7 +603,7 @@ gtk_tree_item_paint (GtkWidget    *widget,
    * line. (Like the way that the tree in Windows Explorer
    * works).
    */
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       tree_item = GTK_TREE_ITEM(widget);
 
@@ -681,7 +681,7 @@ gtk_tree_item_expose_child (GtkWidget *child,
     GdkEventExpose *event;
   } *data = client_data;
 
-  if (GTK_WIDGET_DRAWABLE (child) &&
+  if (gtk_widget_is_drawable (child) &&
       !gtk_widget_get_has_window (child) &&
       (child->window == data->event->window))
     {
@@ -709,7 +709,7 @@ gtk_tree_item_expose (GtkWidget      *widget,
     GdkEventExpose *event;
   } data;
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       gtk_tree_item_paint (widget, &event->area);
 
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index d650a40..b4411cf 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -671,7 +671,7 @@ static void
 gtk_viewport_paint (GtkWidget    *widget,
 		    GdkRectangle *area)
 {
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       GtkViewport *viewport = GTK_VIEWPORT (widget);
 
@@ -688,7 +688,7 @@ gtk_viewport_expose (GtkWidget      *widget,
 {
   GtkViewport *viewport;
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       viewport = GTK_VIEWPORT (widget);
 
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 027e5b8..25868a8 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3015,7 +3015,7 @@ gtk_widget_queue_draw_child (GtkWidget *widget)
   GtkWidget *parent;
 
   parent = widget->parent;
-  if (parent && GTK_WIDGET_DRAWABLE (parent))
+  if (parent && gtk_widget_is_drawable (parent))
     gtk_widget_queue_draw_area (parent,
 				widget->allocation.x,
 				widget->allocation.y,
@@ -3831,7 +3831,7 @@ gtk_widget_draw (GtkWidget          *widget,
 {
   g_return_if_fail (GTK_IS_WIDGET (widget));
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       if (area)
         gtk_widget_queue_draw_area (widget,
@@ -4284,7 +4284,7 @@ gtk_widget_real_can_activate_accel (GtkWidget *widget,
                                     guint      signal_id)
 {
   /* widgets must be onscreen for accels to take effect */
-  return GTK_WIDGET_IS_SENSITIVE (widget) && GTK_WIDGET_DRAWABLE (widget) && gdk_window_is_viewable (widget->window);
+  return GTK_WIDGET_IS_SENSITIVE (widget) && gtk_widget_is_drawable (widget) && gdk_window_is_viewable (widget->window);
 }
 
 /**
@@ -5786,7 +5786,7 @@ gtk_widget_set_state (GtkWidget           *widget,
 
       gtk_widget_propagate_state (widget, &data);
   
-      if (GTK_WIDGET_DRAWABLE (widget))
+      if (gtk_widget_is_drawable (widget))
 	gtk_widget_queue_draw (widget);
     }
 }
@@ -6073,7 +6073,7 @@ gtk_widget_set_app_paintable (GtkWidget *widget,
       else
 	GTK_WIDGET_UNSET_FLAGS (widget, GTK_APP_PAINTABLE);
 
-      if (GTK_WIDGET_DRAWABLE (widget))
+      if (gtk_widget_is_drawable (widget))
 	gtk_widget_queue_draw (widget);
 
       g_object_notify (G_OBJECT (widget), "app-paintable");
@@ -6240,7 +6240,7 @@ gtk_widget_set_sensitive (GtkWidget *widget,
     data.parent_sensitive = TRUE;
 
   gtk_widget_propagate_state (widget, &data);
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     gtk_widget_queue_draw (widget);
 
   g_object_notify (G_OBJECT (widget), "sensitive");
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 0f361f3..ab056fe 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -240,13 +240,17 @@ typedef enum
  */
 #define GTK_WIDGET_VISIBLE(wid)		  ((GTK_WIDGET_FLAGS (wid) & GTK_VISIBLE) != 0)
 
+#ifndef GTK_DISABLE_DEPRECATED
 /**
  * GTK_WIDGET_DRAWABLE:
  * @wid: a #GtkWidget.
  *
  * Evaluates to %TRUE if the widget is mapped and visible.
+ *
+ * Deprecated: 2.20: Use gtk_widget_is_drawable() instead.
  */
 #define GTK_WIDGET_DRAWABLE(wid)	  (GTK_WIDGET_VISIBLE (wid) && GTK_WIDGET_MAPPED (wid))
+#endif
 
 /**
  * GTK_WIDGET_SENSITIVE:
diff --git a/gtk/tests/filechooser.c b/gtk/tests/filechooser.c
index 300e15a..6b99459 100644
--- a/gtk/tests/filechooser.c
+++ b/gtk/tests/filechooser.c
@@ -531,7 +531,7 @@ test_widgets_for_current_action (GtkFileChooserDialog *dialog,
 			  && impl->save_folder_label == NULL
 			  && impl->save_folder_combo == NULL
 			  && impl->save_expander == NULL
-			  && GTK_IS_CONTAINER (impl->browse_widgets) && GTK_WIDGET_DRAWABLE (impl->browse_widgets));
+			  && GTK_IS_CONTAINER (impl->browse_widgets) && gtk_widget_is_drawable (impl->browse_widgets));
     }
   else if (has_action (save_actions, G_N_ELEMENTS (save_actions), impl->action))
     {
@@ -539,11 +539,11 @@ test_widgets_for_current_action (GtkFileChooserDialog *dialog,
        * _gtk_file_chooser_entry_get_type(), which is a non-exported symbol.
        * So, we just test impl->location_entry for being non-NULL
        */
-      passed = passed && (GTK_IS_CONTAINER (impl->save_widgets) && GTK_WIDGET_DRAWABLE (impl->save_widgets)
-			  && impl->location_entry != NULL && GTK_WIDGET_DRAWABLE (impl->location_entry)
-			  && GTK_IS_LABEL (impl->save_folder_label) && GTK_WIDGET_DRAWABLE (impl->save_folder_label)
-			  && GTK_IS_COMBO_BOX (impl->save_folder_combo) && GTK_WIDGET_DRAWABLE (impl->save_folder_combo)
-			  && GTK_IS_EXPANDER (impl->save_expander) && GTK_WIDGET_DRAWABLE (impl->save_expander)
+      passed = passed && (GTK_IS_CONTAINER (impl->save_widgets) && gtk_widget_is_drawable (impl->save_widgets)
+			  && impl->location_entry != NULL && gtk_widget_is_drawable (impl->location_entry)
+			  && GTK_IS_LABEL (impl->save_folder_label) && gtk_widget_is_drawable (impl->save_folder_label)
+			  && GTK_IS_COMBO_BOX (impl->save_folder_combo) && gtk_widget_is_drawable (impl->save_folder_combo)
+			  && GTK_IS_EXPANDER (impl->save_expander) && gtk_widget_is_drawable (impl->save_expander)
 			  && GTK_IS_CONTAINER (impl->browse_widgets));
 
       /* FIXME: we are in a SAVE mode; test the visibility and sensitivity of
diff --git a/modules/other/gail/gailwidget.c b/modules/other/gail/gailwidget.c
index 0545459..9a7e5df 100644
--- a/modules/other/gail/gailwidget.c
+++ b/modules/other/gail/gailwidget.c
@@ -666,7 +666,7 @@ gail_widget_get_extents (AtkComponent   *component,
 
   *width = widget->allocation.width;
   *height = widget->allocation.height;
-  if (!gail_widget_on_screen (widget) || (!GTK_WIDGET_DRAWABLE (widget)))
+  if (!gail_widget_on_screen (widget) || (!gtk_widget_is_drawable (widget)))
     {
       *x = G_MININT;
       *y = G_MININT;
diff --git a/modules/other/gail/gailwindow.c b/modules/other/gail/gailwindow.c
index 416e0f5..5f2e8b4 100644
--- a/modules/other/gail/gailwindow.c
+++ b/modules/other/gail/gailwindow.c
@@ -576,7 +576,7 @@ gail_window_get_extents (AtkComponent  *component,
 
   *width = rect.width;
   *height = rect.height;
-  if (!GTK_WIDGET_DRAWABLE (widget))
+  if (!gtk_widget_is_drawable (widget))
     {
       *x = G_MININT;
       *y = G_MININT;
diff --git a/tests/gtkoffscreenbox.c b/tests/gtkoffscreenbox.c
index 14e3dbf..e7fa941 100644
--- a/tests/gtkoffscreenbox.c
+++ b/tests/gtkoffscreenbox.c
@@ -572,7 +572,7 @@ gtk_offscreen_box_expose (GtkWidget      *widget,
 {
   GtkOffscreenBox *offscreen_box = GTK_OFFSCREEN_BOX (widget);
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       if (event->window == widget->window)
 	{
diff --git a/tests/testgtk.c b/tests/testgtk.c
index be81cac..05afc5d 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -11720,7 +11720,7 @@ progressbar_toggle_ellipsize (GtkWidget *widget,
                               gpointer   data)
 {
   ProgressData *pdata = data;
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       gint i = gtk_option_menu_get_history (GTK_OPTION_MENU (widget));
       gtk_progress_bar_set_ellipsize (GTK_PROGRESS_BAR (pdata->pbar), i);
@@ -12954,7 +12954,7 @@ scroll_test_adjustment_changed (GtkAdjustment *adj, GtkWidget *widget)
   dy = scroll_test_pos - (int)adj->value;
   scroll_test_pos = adj->value;
 
-  if (!GTK_WIDGET_DRAWABLE (widget))
+  if (!gtk_widget_is_drawable (widget))
     return;
   gdk_window_scroll (widget->window, 0, dy);
   gdk_window_process_updates (widget->window, FALSE);
diff --git a/tests/testoffscreenwindow.c b/tests/testoffscreenwindow.c
index 7358188..852a073 100644
--- a/tests/testoffscreenwindow.c
+++ b/tests/testoffscreenwindow.c
@@ -9,7 +9,7 @@ da_expose (GtkWidget *widget,
   GdkPixmap *pixmap;
   cairo_t *cr;
 
-  if (GTK_WIDGET_DRAWABLE (widget))
+  if (gtk_widget_is_drawable (widget))
     {
       pixmap = gtk_offscreen_window_get_pixmap (offscreen);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]