forked from AuroraMiddleware/gtk
Deprecate all the public API that is using GdkColor struct
This commit is contained in:
parent
115d92aa11
commit
a3abc18858
@ -89,6 +89,8 @@ gdk_cairo_get_clip_rectangle (cairo_t *cr,
|
||||
* Sets the specified #GdkColor as the source color of @cr.
|
||||
*
|
||||
* Since: 2.8
|
||||
*
|
||||
* Deprecated: 3.4: Use gdk_cairo_set_source_rgba() instead
|
||||
*/
|
||||
void
|
||||
gdk_cairo_set_source_color (cairo_t *cr,
|
||||
|
@ -35,8 +35,6 @@ cairo_t * gdk_cairo_create (GdkWindow *window);
|
||||
gboolean gdk_cairo_get_clip_rectangle (cairo_t *cr,
|
||||
GdkRectangle *rect);
|
||||
|
||||
void gdk_cairo_set_source_color (cairo_t *cr,
|
||||
const GdkColor *color);
|
||||
void gdk_cairo_set_source_rgba (cairo_t *cr,
|
||||
const GdkRGBA *rgba);
|
||||
void gdk_cairo_set_source_pixbuf (cairo_t *cr,
|
||||
@ -57,6 +55,10 @@ cairo_region_t *
|
||||
gdk_cairo_region_create_from_surface
|
||||
(cairo_surface_t *surface);
|
||||
|
||||
GDK_DEPRECATED_FOR(gdk_cairo_set_source_rgba)
|
||||
void gdk_cairo_set_source_color (cairo_t *cr,
|
||||
const GdkColor *color);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GDK_CAIRO_H__ */
|
||||
|
@ -6542,6 +6542,8 @@ gdk_window_move_region (GdkWindow *window,
|
||||
* implementing a custom widget.)
|
||||
*
|
||||
* See also gdk_window_set_background_pattern().
|
||||
*
|
||||
* Deprecated: 3.4: Use gdk_window_set_background_rgba() instead.
|
||||
*/
|
||||
void
|
||||
gdk_window_set_background (GdkWindow *window,
|
||||
|
@ -657,6 +657,7 @@ void gdk_window_set_startup_id (GdkWindow *window,
|
||||
const gchar *startup_id);
|
||||
void gdk_window_set_transient_for (GdkWindow *window,
|
||||
GdkWindow *parent);
|
||||
GDK_DEPRECATED_FOR(gdk_window_set_background_rgba)
|
||||
void gdk_window_set_background (GdkWindow *window,
|
||||
const GdkColor *color);
|
||||
void gdk_window_set_background_rgba (GdkWindow *window,
|
||||
|
@ -380,13 +380,20 @@ gtk_cell_renderer_class_init (GtkCellRendererClass *class)
|
||||
NULL,
|
||||
GTK_PARAM_WRITABLE));
|
||||
|
||||
/**
|
||||
* GtkCellRenderer:cell-background-gdk:
|
||||
*
|
||||
* Cell background as a #GdkColor
|
||||
*
|
||||
* Deprecated: 3.4: Use #GtkCellRenderer:cell-background-rgba instead.
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_CELL_BACKGROUND_GDK,
|
||||
g_param_spec_boxed ("cell-background-gdk",
|
||||
P_("Cell background color"),
|
||||
P_("Cell background color as a GdkColor"),
|
||||
GDK_TYPE_COLOR,
|
||||
GTK_PARAM_READWRITE));
|
||||
GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
|
||||
/**
|
||||
* GtkCellRenderer:cell-background-rgba:
|
||||
*
|
||||
|
@ -290,13 +290,20 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
|
||||
NULL,
|
||||
GTK_PARAM_WRITABLE));
|
||||
|
||||
/**
|
||||
* GtkCellRendererText:background-gdk:
|
||||
*
|
||||
* Background color as a #GdkColor
|
||||
*
|
||||
* Deprecated: 3.4: Use #GtkCellRendererText:background-rgba instead.
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_BACKGROUND_GDK,
|
||||
g_param_spec_boxed ("background-gdk",
|
||||
P_("Background color"),
|
||||
P_("Background color as a GdkColor"),
|
||||
GDK_TYPE_COLOR,
|
||||
GTK_PARAM_READWRITE));
|
||||
GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
|
||||
|
||||
/**
|
||||
* GtkCellRendererText:background-rgba:
|
||||
@ -320,13 +327,20 @@ gtk_cell_renderer_text_class_init (GtkCellRendererTextClass *class)
|
||||
NULL,
|
||||
GTK_PARAM_WRITABLE));
|
||||
|
||||
/**
|
||||
* GtkCellRendererText:foreground-gdk:
|
||||
*
|
||||
* Foreground color as a #GdkColor
|
||||
*
|
||||
* Deprecated: 3.4: Use #GtkCellRendererText:foreground-rgba instead.
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_FOREGROUND_GDK,
|
||||
g_param_spec_boxed ("foreground-gdk",
|
||||
P_("Foreground color"),
|
||||
P_("Foreground color as a GdkColor"),
|
||||
GDK_TYPE_COLOR,
|
||||
GTK_PARAM_READWRITE));
|
||||
GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
|
||||
|
||||
/**
|
||||
* GtkCellRendererText:foreground-rgba:
|
||||
|
@ -192,13 +192,21 @@ gtk_cell_view_class_init (GtkCellViewClass *klass)
|
||||
P_("Background color as a string"),
|
||||
NULL,
|
||||
GTK_PARAM_WRITABLE));
|
||||
|
||||
/**
|
||||
* GtkCellView:background-gdk
|
||||
*
|
||||
* The background color as a #GdkColor
|
||||
*
|
||||
* Deprecated: 3.4: Use #GtkCellView:background-rgba instead.
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_BACKGROUND_GDK,
|
||||
g_param_spec_boxed ("background-gdk",
|
||||
P_("Background color"),
|
||||
P_("Background color as a GdkColor"),
|
||||
GDK_TYPE_COLOR,
|
||||
GTK_PARAM_READWRITE));
|
||||
GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
|
||||
/**
|
||||
* GtkCellView:background-rgba
|
||||
*
|
||||
@ -1268,6 +1276,8 @@ gtk_cell_view_get_size_of_row (GtkCellView *cell_view,
|
||||
* Sets the background color of @view.
|
||||
*
|
||||
* Since: 2.6
|
||||
*
|
||||
* Deprecated: 3.4: Use gtk_cell_view_set_background_rgba() instead.
|
||||
*/
|
||||
void
|
||||
gtk_cell_view_set_background_color (GtkCellView *cell_view,
|
||||
|
@ -75,8 +75,6 @@ GtkTreeModel *gtk_cell_view_get_model (GtkCellView *cell_v
|
||||
void gtk_cell_view_set_displayed_row (GtkCellView *cell_view,
|
||||
GtkTreePath *path);
|
||||
GtkTreePath *gtk_cell_view_get_displayed_row (GtkCellView *cell_view);
|
||||
void gtk_cell_view_set_background_color (GtkCellView *cell_view,
|
||||
const GdkColor *color);
|
||||
void gtk_cell_view_set_background_rgba (GtkCellView *cell_view,
|
||||
const GdkRGBA *rgba);
|
||||
gboolean gtk_cell_view_get_draw_sensitive (GtkCellView *cell_view);
|
||||
@ -90,6 +88,9 @@ GDK_DEPRECATED_FOR(gtk_widget_get_preferred_size)
|
||||
gboolean gtk_cell_view_get_size_of_row (GtkCellView *cell_view,
|
||||
GtkTreePath *path,
|
||||
GtkRequisition *requisition);
|
||||
GDK_DEPRECATED_FOR(gtk_cell_view_set_background_rgba)
|
||||
void gtk_cell_view_set_background_color (GtkCellView *cell_view,
|
||||
const GdkColor *color);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -193,6 +193,8 @@ gtk_color_button_class_init (GtkColorButtonClass *klass)
|
||||
* The selected color.
|
||||
*
|
||||
* Since: 2.4
|
||||
*
|
||||
* Deprecated: 3.4: Use #GtkColorButton:rgba instead.
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_COLOR,
|
||||
@ -200,7 +202,7 @@ gtk_color_button_class_init (GtkColorButtonClass *klass)
|
||||
P_("Current Color"),
|
||||
P_("The selected color"),
|
||||
GDK_TYPE_COLOR,
|
||||
GTK_PARAM_READWRITE));
|
||||
GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
|
||||
|
||||
/**
|
||||
* GtkColorButton:alpha:
|
||||
@ -555,6 +557,8 @@ gtk_color_button_new (void)
|
||||
* Returns: a new color button
|
||||
*
|
||||
* Since: 2.4
|
||||
*
|
||||
* Deprecated: 3.4: Use gtk_color_button_new_with_rgba() instead.
|
||||
*/
|
||||
GtkWidget *
|
||||
gtk_color_button_new_with_color (const GdkColor *color)
|
||||
@ -691,6 +695,8 @@ gtk_color_button_clicked (GtkButton *button)
|
||||
* Sets the current color to be @color.
|
||||
*
|
||||
* Since: 2.4
|
||||
*
|
||||
* Deprecated: Use gtk_color_button_set_rgba() instead.
|
||||
*/
|
||||
void
|
||||
gtk_color_button_set_color (GtkColorButton *color_button,
|
||||
@ -741,6 +747,8 @@ gtk_color_button_set_alpha (GtkColorButton *color_button,
|
||||
* Sets @color to be the current color in the #GtkColorButton widget.
|
||||
*
|
||||
* Since: 2.4
|
||||
*
|
||||
* Deprecated: 3.4: Use gtk_color_button_get_rgba() instead.
|
||||
*/
|
||||
void
|
||||
gtk_color_button_get_color (GtkColorButton *color_button,
|
||||
|
@ -75,14 +75,9 @@ struct _GtkColorButtonClass {
|
||||
|
||||
GType gtk_color_button_get_type (void) G_GNUC_CONST;
|
||||
GtkWidget *gtk_color_button_new (void);
|
||||
GtkWidget *gtk_color_button_new_with_color (const GdkColor *color);
|
||||
GtkWidget *gtk_color_button_new_with_rgba (const GdkRGBA *rgba);
|
||||
void gtk_color_button_set_color (GtkColorButton *color_button,
|
||||
const GdkColor *color);
|
||||
void gtk_color_button_set_alpha (GtkColorButton *color_button,
|
||||
guint16 alpha);
|
||||
void gtk_color_button_get_color (GtkColorButton *color_button,
|
||||
GdkColor *color);
|
||||
guint16 gtk_color_button_get_alpha (GtkColorButton *color_button);
|
||||
void gtk_color_button_set_use_alpha (GtkColorButton *color_button,
|
||||
gboolean use_alpha);
|
||||
@ -95,6 +90,15 @@ void gtk_color_button_set_title (GtkColorButton *color_button,
|
||||
const gchar *title);
|
||||
const gchar *gtk_color_button_get_title (GtkColorButton *color_button);
|
||||
|
||||
GDK_DEPRECATED_FOR(gtk_color_button_new_with_rgba)
|
||||
GtkWidget *gtk_color_button_new_with_color (const GdkColor *color);
|
||||
GDK_DEPRECATED_FOR(gtk_color_button_set_rgba)
|
||||
void gtk_color_button_set_color (GtkColorButton *color_button,
|
||||
const GdkColor *color);
|
||||
GDK_DEPRECATED_FOR(gtk_color_button_get_rgba)
|
||||
void gtk_color_button_get_color (GtkColorButton *color_button,
|
||||
GdkColor *color);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -329,13 +329,21 @@ gtk_color_selection_class_init (GtkColorSelectionClass *klass)
|
||||
P_("Whether a palette should be used"),
|
||||
FALSE,
|
||||
GTK_PARAM_READWRITE));
|
||||
|
||||
/**
|
||||
* GtkColorSelection:current-color
|
||||
*
|
||||
* The current GdkColor color.
|
||||
*
|
||||
* Deprecated: 3.4: Use #GtkColorSelection:current-rgba instead.
|
||||
*/
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_CURRENT_COLOR,
|
||||
g_param_spec_boxed ("current-color",
|
||||
P_("Current Color"),
|
||||
P_("The current color"),
|
||||
GDK_TYPE_COLOR,
|
||||
GTK_PARAM_READWRITE));
|
||||
GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
|
||||
g_object_class_install_property (gobject_class,
|
||||
PROP_CURRENT_ALPHA,
|
||||
g_param_spec_uint ("current-alpha",
|
||||
@ -2488,6 +2496,8 @@ gtk_color_selection_set_has_palette (GtkColorSelection *colorsel,
|
||||
*
|
||||
* The first time this is called, it will also set
|
||||
* the original color to be @color too.
|
||||
*
|
||||
* Deprecated: 3.4: Use gtk_color_selection_set_current_rgba() instead.
|
||||
*/
|
||||
void
|
||||
gtk_color_selection_set_current_color (GtkColorSelection *colorsel,
|
||||
@ -2556,6 +2566,8 @@ gtk_color_selection_set_current_alpha (GtkColorSelection *colorsel,
|
||||
* @color: (out): a #GdkColor to fill in with the current color
|
||||
*
|
||||
* Sets @color to be the current color in the GtkColorSelection widget.
|
||||
*
|
||||
* Deprecated: 3.4: Use gtk_color_selection_get_current_rgba() instead.
|
||||
*/
|
||||
void
|
||||
gtk_color_selection_get_current_color (GtkColorSelection *colorsel,
|
||||
@ -2602,6 +2614,8 @@ gtk_color_selection_get_current_alpha (GtkColorSelection *colorsel)
|
||||
* as it might seem confusing to have that color change.
|
||||
* Calling gtk_color_selection_set_current_color() will also
|
||||
* set this color the first time it is called.
|
||||
*
|
||||
* Deprecated: 3.4: Use gtk_color_selection_set_previous_rgba() instead.
|
||||
*/
|
||||
void
|
||||
gtk_color_selection_set_previous_color (GtkColorSelection *colorsel,
|
||||
@ -2661,6 +2675,8 @@ gtk_color_selection_set_previous_alpha (GtkColorSelection *colorsel,
|
||||
* @color: (out): a #GdkColor to fill in with the original color value
|
||||
*
|
||||
* Fills @color in with the original color value.
|
||||
*
|
||||
* Deprecated: 3.4: Use gtk_color_selection_get_previous_rgba() instead.
|
||||
*/
|
||||
void
|
||||
gtk_color_selection_get_previous_color (GtkColorSelection *colorsel,
|
||||
|
@ -98,19 +98,11 @@ void gtk_color_selection_set_has_palette (GtkColorSelection *color
|
||||
gboolean has_palette);
|
||||
|
||||
|
||||
void gtk_color_selection_set_current_color (GtkColorSelection *colorsel,
|
||||
const GdkColor *color);
|
||||
void gtk_color_selection_set_current_alpha (GtkColorSelection *colorsel,
|
||||
guint16 alpha);
|
||||
void gtk_color_selection_get_current_color (GtkColorSelection *colorsel,
|
||||
GdkColor *color);
|
||||
guint16 gtk_color_selection_get_current_alpha (GtkColorSelection *colorsel);
|
||||
void gtk_color_selection_set_previous_color (GtkColorSelection *colorsel,
|
||||
const GdkColor *color);
|
||||
void gtk_color_selection_set_previous_alpha (GtkColorSelection *colorsel,
|
||||
guint16 alpha);
|
||||
void gtk_color_selection_get_previous_color (GtkColorSelection *colorsel,
|
||||
GdkColor *color);
|
||||
guint16 gtk_color_selection_get_previous_alpha (GtkColorSelection *colorsel);
|
||||
|
||||
void gtk_color_selection_set_current_rgba (GtkColorSelection *colorsel,
|
||||
@ -132,6 +124,20 @@ gchar* gtk_color_selection_palette_to_string (const GdkColor *colors,
|
||||
|
||||
GtkColorSelectionChangePaletteWithScreenFunc gtk_color_selection_set_change_palette_with_screen_hook (GtkColorSelectionChangePaletteWithScreenFunc func);
|
||||
|
||||
GDK_DEPRECATED_FOR(gtk_color_selection_set_current_rgba)
|
||||
void gtk_color_selection_set_current_color (GtkColorSelection *colorsel,
|
||||
const GdkColor *color);
|
||||
GDK_DEPRECATED_FOR(gtk_color_selection_get_current_rgba)
|
||||
void gtk_color_selection_get_current_color (GtkColorSelection *colorsel,
|
||||
GdkColor *color);
|
||||
GDK_DEPRECATED_FOR(gtk_color_selection_set_previous_rgba)
|
||||
void gtk_color_selection_set_previous_color (GtkColorSelection *colorsel,
|
||||
const GdkColor *color);
|
||||
GDK_DEPRECATED_FOR(gtk_color_selection_get_previous_rgba)
|
||||
void gtk_color_selection_get_previous_color (GtkColorSelection *colorsel,
|
||||
GdkColor *color);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_COLOR_SELECTION_H__ */
|
||||
|
@ -200,13 +200,20 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
|
||||
NULL,
|
||||
GTK_PARAM_WRITABLE));
|
||||
|
||||
/**
|
||||
* GtkTextTag:background-gdk:
|
||||
*
|
||||
* Background color as a #GdkColor.
|
||||
*
|
||||
* Deprecated: 3.4: Use #GtkTextTag:background-rgba instead.
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_BACKGROUND_GDK,
|
||||
g_param_spec_boxed ("background-gdk",
|
||||
P_("Background color"),
|
||||
P_("Background color as a GdkColor"),
|
||||
GDK_TYPE_COLOR,
|
||||
GTK_PARAM_READWRITE));
|
||||
GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
|
||||
|
||||
/**
|
||||
* GtkTextTag:background-rgba:
|
||||
@ -239,13 +246,20 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
|
||||
NULL,
|
||||
GTK_PARAM_WRITABLE));
|
||||
|
||||
/**
|
||||
* GtkTextTag:foreground-gdk:
|
||||
*
|
||||
* Foreground color as a #GdkColor.
|
||||
*
|
||||
* Deprecated: 3.4: Use #GtkTextTag:foreground-rgba instead.
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_FOREGROUND_GDK,
|
||||
g_param_spec_boxed ("foreground-gdk",
|
||||
P_("Foreground color"),
|
||||
P_("Foreground color as a GdkColor"),
|
||||
GDK_TYPE_COLOR,
|
||||
GTK_PARAM_READWRITE));
|
||||
GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
|
||||
|
||||
/**
|
||||
* GtkTextTag:foreground-rgba:
|
||||
@ -553,6 +567,8 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
|
||||
* The paragraph background color as a as a #GdkColor.
|
||||
*
|
||||
* Since: 2.8
|
||||
*
|
||||
* Deprecated: 3.4: Use #GtkTextTag:paragraph-background-rgba instead.
|
||||
*/
|
||||
g_object_class_install_property (object_class,
|
||||
PROP_PARAGRAPH_BACKGROUND_GDK,
|
||||
@ -560,7 +576,7 @@ gtk_text_tag_class_init (GtkTextTagClass *klass)
|
||||
P_("Paragraph background color"),
|
||||
P_("Paragraph background color as a GdkColor"),
|
||||
GDK_TYPE_COLOR,
|
||||
GTK_PARAM_READWRITE));
|
||||
GTK_PARAM_READWRITE | G_PARAM_DEPRECATED));
|
||||
|
||||
/**
|
||||
* GtkTextTag:paragraph-background-rgba:
|
||||
|
Loading…
Reference in New Issue
Block a user