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



commit d1964bd074e07f0e80fa4fad189ee7900c969e3a
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 2b27f9d..db3ec07 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -4213,7 +4213,6 @@ gtk_widget_get_child_requisition
 #endif
 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
@@ -4300,7 +4299,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 ef0ddd4..ecd0197 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -452,7 +452,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;
@@ -549,7 +548,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");
@@ -8654,47 +8652,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
  * 
@@ -8744,32 +8701,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 279ebf5..441ef71 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -708,7 +708,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);
@@ -749,15 +748,6 @@ void     gtk_widget_set_margin_bottom (GtkWidget *widget,
                                        int        margin);
 
 
-/* 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]