forked from AuroraMiddleware/gtk
API: Remove colormap setting and getting from GtkWidget
gtk_widget_get_colormap() and gtk_widget_set_colormap() are gone. They are replaced by visuals.
This commit is contained in:
parent
4701bdb2a8
commit
c51e8bd9e5
@ -4805,8 +4805,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
|
||||
|
@ -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
|
||||
|
@ -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");
|
||||
@ -8658,47 +8656,6 @@ gtk_widget_get_ancestor (GtkWidget *widget,
|
||||
return 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
|
||||
@ -8748,32 +8705,6 @@ gtk_widget_get_settings (GtkWidget *widget)
|
||||
return gtk_settings_get_for_screen (gtk_widget_get_screen (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
|
||||
|
@ -731,7 +731,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);
|
||||
@ -772,15 +771,6 @@ void gtk_widget_set_margin_bottom (GtkWidget *widget,
|
||||
gint 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);
|
||||
|
Loading…
Reference in New Issue
Block a user