[gtk+/rendering-cleanup: 115/141] API: Remove colormap setting and getting from GtkWidget



commit 15fff6b82d77f8fb3ce1860a89fb2d20366df2ca
Author: Benjamin Otte <otte redhat com>
Date:   Sat Aug 28 23:19:28 2010 +0200

    API: Remove colormap setting and getting from GtkWidget
    
    gtk_widget_get_colormap() and gtk_widget_set_colormap() are gone. They
    are replaced by visuals.

 docs/reference/gtk/gtk3-sections.txt |    2 -
 gtk/gtk.symbols                      |    2 -
 gtk/gtkwidget.c                      |   69 ----------------------------------
 gtk/gtkwidget.h                      |   10 -----
 4 files changed, 0 insertions(+), 83 deletions(-)
---
diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt
index d90fc10..abab28c 100644
--- a/docs/reference/gtk/gtk3-sections.txt
+++ b/docs/reference/gtk/gtk3-sections.txt
@@ -4809,8 +4809,6 @@ gtk_widget_get_device_events
 gtk_widget_add_device_events
 gtk_widget_get_toplevel
 gtk_widget_get_ancestor
-gtk_widget_get_colormap
-gtk_widget_set_colormap
 gtk_widget_get_visual
 gtk_widget_get_pointer
 gtk_widget_is_ancestor
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index 6c9188a..e439ea1 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -4211,7 +4211,6 @@ gtk_widget_get_app_paintable
 gtk_widget_get_child_requisition
 gtk_widget_get_child_visible
 gtk_widget_get_clipboard
-gtk_widget_get_colormap
 gtk_widget_get_composite_name
 gtk_widget_get_default_colormap
 gtk_widget_get_default_direction
@@ -4298,7 +4297,6 @@ gtk_widget_set_accel_path
 gtk_widget_set_allocation
 gtk_widget_set_app_paintable
 gtk_widget_set_child_visible
-gtk_widget_set_colormap
 gtk_widget_set_composite_name
 gtk_widget_set_default_colormap
 gtk_widget_set_default_direction
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 9b0262e..45d18d0 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -435,7 +435,6 @@ static GQuark		quark_parent_window = 0;
 static GQuark		quark_pointer_window = 0;
 static GQuark		quark_shape_info = 0;
 static GQuark		quark_input_shape_info = 0;
-static GQuark		quark_colormap = 0;
 static GQuark		quark_pango_context = 0;
 static GQuark		quark_rc_style = 0;
 static GQuark		quark_accessible_object = 0;
@@ -532,7 +531,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
   quark_pointer_window = g_quark_from_static_string ("gtk-pointer-window");
   quark_shape_info = g_quark_from_static_string ("gtk-shape-info");
   quark_input_shape_info = g_quark_from_static_string ("gtk-input-shape-info");
-  quark_colormap = g_quark_from_static_string ("gtk-colormap");
   quark_pango_context = g_quark_from_static_string ("gtk-pango-context");
   quark_rc_style = g_quark_from_static_string ("gtk-rc-style");
   quark_accessible_object = g_quark_from_static_string ("gtk-accessible-object");
@@ -8297,47 +8295,6 @@ gtk_widget_get_ancestor (GtkWidget *widget,
 }
 
 /**
- * gtk_widget_get_colormap:
- * @widget: a #GtkWidget
- * 
- * Gets the colormap that will be used to render @widget. No reference will
- * be added to the returned colormap; it should not be unreferenced.
- *
- * Return value: (transfer none): the colormap used by @widget
- **/
-GdkColormap*
-gtk_widget_get_colormap (GtkWidget *widget)
-{
-  GtkWidgetPrivate *priv;
-  GdkColormap *colormap;
-  GtkWidget *tmp_widget;
-  
-  g_return_val_if_fail (GTK_IS_WIDGET (widget), NULL);
-
-  priv = widget->priv;
-
-  if (priv->window)
-    {
-      colormap = gdk_drawable_get_colormap (priv->window);
-      /* If window was destroyed previously, we'll get NULL here */
-      if (colormap)
-	return colormap;
-    }
-
-  tmp_widget = widget;
-  while (tmp_widget)
-    {
-      colormap = g_object_get_qdata (G_OBJECT (tmp_widget), quark_colormap);
-      if (colormap)
-	return colormap;
-
-      tmp_widget= tmp_widget->priv->parent;
-    }
-
-  return gdk_screen_get_default_colormap (gtk_widget_get_screen (widget));
-}
-
-/**
  * gtk_widget_get_visual:
  * @widget: a #GtkWidget
  * 
@@ -8387,32 +8344,6 @@ gtk_widget_get_settings (GtkWidget *widget)
 }
 
 /**
- * gtk_widget_set_colormap:
- * @widget: a #GtkWidget
- * @colormap: a colormap
- *
- * Sets the colormap for the widget to the given value. Widget must not
- * have been previously realized. This probably should only be used
- * from an <function>init()</function> function (i.e. from the constructor 
- * for the widget).
- **/
-void
-gtk_widget_set_colormap (GtkWidget   *widget,
-                         GdkColormap *colormap)
-{
-  g_return_if_fail (GTK_IS_WIDGET (widget));
-  g_return_if_fail (!gtk_widget_get_realized (widget));
-  g_return_if_fail (GDK_IS_COLORMAP (colormap));
-
-  g_object_ref (colormap);
-  
-  g_object_set_qdata_full (G_OBJECT (widget), 
-			   quark_colormap,
-			   colormap,
-			   g_object_unref);
-}
-
-/**
  * gtk_widget_get_events:
  * @widget: a #GtkWidget
  * 
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 8090227..5e36082 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -692,7 +692,6 @@ GdkExtensionMode gtk_widget_get_extension_events (GtkWidget	*widget);
 GtkWidget*   gtk_widget_get_toplevel	(GtkWidget	*widget);
 GtkWidget*   gtk_widget_get_ancestor	(GtkWidget	*widget,
 					 GType		 widget_type);
-GdkColormap* gtk_widget_get_colormap	(GtkWidget	*widget);
 GdkVisual*   gtk_widget_get_visual	(GtkWidget	*widget);
 
 GdkScreen *   gtk_widget_get_screen      (GtkWidget *widget);
@@ -711,15 +710,6 @@ void             gtk_widget_set_support_multidevice (GtkWidget      *widget,
 /* Accessibility support */
 AtkObject*       gtk_widget_get_accessible               (GtkWidget          *widget);
 
-/* The following functions must not be called on an already
- * realized widget. Because it is possible that somebody
- * can call get_colormap() or get_visual() and save the
- * result, these functions are probably only safe to
- * call in a widget's init() function.
- */
-void         gtk_widget_set_colormap    (GtkWidget      *widget,
-					 GdkColormap    *colormap);
-
 gint	     gtk_widget_get_events	(GtkWidget	*widget);
 GdkEventMask gtk_widget_get_device_events (GtkWidget	*widget,
                                            GdkDevice    *device);



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