diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c index 11918715d6..54cf2fcd76 100644 --- a/gtk/gtkrc.c +++ b/gtk/gtkrc.c @@ -541,9 +541,11 @@ gtk_rc_add_initial_default_files (void) * gtk_rc_add_default_file: * @filename: the pathname to the file. If @filename is not absolute, it * is searched in the current directory. - * + * * Adds a file to the list of files to be parsed at the * end of gtk_init(). + * + * Deprecated:3.0: Use #GtkStyleContext with a custom #GtkStyleProvider instead **/ void gtk_rc_add_default_file (const gchar *filename) @@ -571,9 +573,11 @@ gtk_rc_add_default_file (const gchar *filename) /** * gtk_rc_set_default_files: * @filenames: A %NULL-terminated list of filenames. - * + * * Sets the list of files that GTK+ will read at the * end of gtk_init(). + * + * Deprecated:3.0: Use #GtkStyleContext with a custom #GtkStyleProvider instead **/ void gtk_rc_set_default_files (gchar **filenames) @@ -608,6 +612,8 @@ gtk_rc_set_default_files (gchar **filenames) * Return value: (transfer none): A %NULL-terminated array of filenames. * This memory is owned by GTK+ and must not be freed by the application. * If you want to store this information, you should make a copy. + * + * Deprecated:3.0: Use #GtkStyleContext instead **/ gchar ** gtk_rc_get_default_files (void) @@ -1964,17 +1970,19 @@ sort_and_dereference_sets (GSList *styles) /** * gtk_rc_get_style: * @widget: a #GtkWidget - * + * * Finds all matching RC styles for a given widget, - * composites them together, and then creates a + * composites them together, and then creates a * #GtkStyle representing the composite appearance. - * (GTK+ actually keeps a cache of previously + * (GTK+ actually keeps a cache of previously * created styles, so a new style may not be * created.) - * + * * Returns: the resulting style. No refcount is added * to the returned style, so if you want to save this * style around, you should add a reference yourself. + * + * Deprecated:3.0: Use #GtkStyleContext instead **/ GtkStyle * gtk_rc_get_style (GtkWidget *widget) @@ -2082,16 +2090,18 @@ gtk_rc_get_style (GtkWidget *widget) * |[ * gtk_widget_path (widget, NULL, &path, NULL); * gtk_widget_class_path (widget, NULL, &class_path, NULL); - * gtk_rc_get_style_by_paths (gtk_widget_get_settings (widget), + * gtk_rc_get_style_by_paths (gtk_widget_get_settings (widget), * path, class_path, * G_OBJECT_TYPE (widget)); * ]| - * + * * Return value: (transfer none): A style created by matching with the * supplied paths, or %NULL if nothing matching was specified and the * default style should be used. The returned value is owned by GTK+ * as part of an internal cache, so you must call g_object_ref() on * the returned value if you want to keep a reference to it. + * + * Deprecated:3.0: Use #GtkStyleContext instead **/ GtkStyle * gtk_rc_get_style_by_paths (GtkSettings *settings, @@ -2171,6 +2181,11 @@ gtk_rc_get_style_by_paths (GtkSettings *settings, return NULL; } +/** + * gtk_rc_scanner_new: + * + * Deprecated:3.0: Use #GtkCssProvider instead + */ GScanner* gtk_rc_scanner_new (void) { @@ -3711,6 +3726,13 @@ gtk_rc_parse_engine (GtkRcContext *context, return result; } +/** + * gtk_rc_parse_state: + * @scanner: + * @state: + * + * Deprecated:3.0: Use #GtkCssProvider instead + */ guint gtk_rc_parse_state (GScanner *scanner, GtkStateType *state) @@ -3762,6 +3784,13 @@ gtk_rc_parse_state (GScanner *scanner, return G_TOKEN_NONE; } +/** + * gtk_rc_parse_priority: + * @scanner: + * @priority: + * + * Deprecated:3.0: Use #GtkCssProvider instead + */ guint gtk_rc_parse_priority (GScanner *scanner, GtkPathPriorityType *priority) @@ -3825,6 +3854,8 @@ gtk_rc_parse_priority (GScanner *scanner, * * Returns: %G_TOKEN_NONE if parsing succeeded, otherwise the token * that was expected but not found + * + * Deprecated:3.0: Use #GtkCssProvider instead */ guint gtk_rc_parse_color (GScanner *scanner, @@ -3847,6 +3878,8 @@ gtk_rc_parse_color (GScanner *scanner, * that was expected but not found * * Since: 2.12 + * + * Deprecated:3.0: Use #GtkCssProvider instead */ guint gtk_rc_parse_color_full (GScanner *scanner, diff --git a/gtk/gtkrc.h b/gtk/gtkrc.h index 598906dd80..65635eebb9 100644 --- a/gtk/gtkrc.h +++ b/gtk/gtkrc.h @@ -131,6 +131,8 @@ gboolean _gtk_rc_match_widget_class (GSList *list, gchar *path, gchar *path_reversed); +#if !defined(GTK_DISABLE_DEPRECATED) || defined(GTK_COMPILATION) + void gtk_rc_add_default_file (const gchar *filename); void gtk_rc_set_default_files (gchar **filenames); gchar** gtk_rc_get_default_files (void); @@ -217,6 +219,8 @@ guint gtk_rc_parse_state (GScanner *scanner, guint gtk_rc_parse_priority (GScanner *scanner, GtkPathPriorityType *priority); +#endif + /* rc properties * (structure forward declared in gtkstyle.h) */ diff --git a/gtk/gtkstyle.c b/gtk/gtkstyle.c index ad23f22a22..a363cc75a7 100644 --- a/gtk/gtkstyle.c +++ b/gtk/gtkstyle.c @@ -793,6 +793,8 @@ gtk_style_constructed (GObject *object) * Creates a copy of the passed in #GtkStyle object. * * Returns: (transfer full): a copy of @style + * + * Deprecated:3.0: Use #GtkStyleContext instead */ GtkStyle* gtk_style_copy (GtkStyle *style) @@ -832,6 +834,8 @@ gtk_style_duplicate (GtkStyle *style) * @returns: a new #GtkStyle. * * Creates a new #GtkStyle. + * + * Deprecated: 3.0: Use #GtkStyleContext **/ GtkStyle* gtk_style_new (void) @@ -872,6 +876,8 @@ gtk_style_has_context (GtkStyle *style) * If the style is newly created, the style parameter * will be unref'ed, and the new style will have * a reference count belonging to the caller. + * + * Deprecated:3.0: Use gtk_widget_style_attach() instead */ GtkStyle* gtk_style_attach (GtkStyle *style, @@ -948,7 +954,8 @@ gtk_style_attach (GtkStyle *style, * * Detaches a style from a window. If the style is not attached * to any windows anymore, it is unrealized. See gtk_style_attach(). - * + * + * Deprecated:3.0: Use #GtkStyleContext instead */ void gtk_style_detach (GtkStyle *style) @@ -995,6 +1002,8 @@ gtk_style_realize (GtkStyle *style, * otherwise %NULL. * * Return value: icon set of @stock_id + * + * Deprecated:3.0: Use gtk_style_context_lookup_icon_set() instead */ GtkIconSet* gtk_style_lookup_icon_set (GtkStyle *style, @@ -1028,6 +1037,8 @@ gtk_style_lookup_icon_set (GtkStyle *style, * Return value: %TRUE if the mapping was found. * * Since: 2.10 + * + * Deprecated:3.0: Use gtk_style_context_lookup_color() instead **/ gboolean gtk_style_lookup_color (GtkStyle *style, @@ -1068,6 +1079,8 @@ gtk_style_lookup_color (GtkStyle *style, * * Sets the background of @window to the background color or pixmap * specified by @style for the given state. + * + * Deprecated:3.0: Use gtk_style_context_set_background() instead */ void gtk_style_set_background (GtkStyle *style, @@ -1556,6 +1569,8 @@ gtk_style_real_set_background (GtkStyle *style, * * Return value: (transfer full): a newly-created #GdkPixbuf * containing the rendered icon + * + * Deprecated:3.0: Use gtk_render_icon_pixbuf() instead */ GdkPixbuf * gtk_style_render_icon (GtkStyle *style, @@ -1593,6 +1608,8 @@ gtk_style_render_icon (GtkStyle *style, * @y: * @width: * @height: + * + * Deprecated:3.0: Use #GtkStyleContext instead */ void gtk_style_apply_default_background (GtkStyle *style, @@ -3678,8 +3695,10 @@ hls_to_rgb (gdouble *h, * * Draws a horizontal line from (@x1, @y) to (@x2, @y) in @cr * using the given style and state. - **/ -void + * + * Deprecated:3.0: Use gtk_render_line() instead + **/ +void gtk_paint_hline (GtkStyle *style, cairo_t *cr, GtkStateType state_type, @@ -3715,6 +3734,8 @@ gtk_paint_hline (GtkStyle *style, * * Draws a vertical line from (@x, @y1_) to (@x, @y2_) in @cr * using the given style and state. + * + * Deprecated:3.0: Use gtk_render_line() instead */ void gtk_paint_vline (GtkStyle *style, @@ -3752,8 +3773,10 @@ gtk_paint_vline (GtkStyle *style, * @width: width of the rectangle * @height: width of the rectangle * - * Draws a shadow around the given rectangle in @cr + * Draws a shadow around the given rectangle in @cr * using the given style and state and shadow type. + * + * Deprecated:3.0: Use gtk_render_frame() instead */ void gtk_paint_shadow (GtkStyle *style, @@ -3796,9 +3819,11 @@ gtk_paint_shadow (GtkStyle *style, * @y: y origin of the rectangle to draw the arrow in * @width: width of the rectangle to draw the arrow in * @height: height of the rectangle to draw the arrow in - * - * Draws an arrow in the given rectangle on @cr using the given + * + * Draws an arrow in the given rectangle on @cr using the given * parameters. @arrow_type determines the direction of the arrow. + * + * Deprecated:3.0: Use gtk_render_arrow() instead */ void gtk_paint_arrow (GtkStyle *style, @@ -3844,6 +3869,8 @@ gtk_paint_arrow (GtkStyle *style, * * Draws a diamond in the given rectangle on @window using the given * parameters. + * + * Deprecated:3.0: Use cairo instead */ void gtk_paint_diamond (GtkStyle *style, @@ -3884,8 +3911,10 @@ gtk_paint_diamond (GtkStyle *style, * @y: y origin of the box * @width: the width of the box * @height: the height of the box - * + * * Draws a box on @cr with the given parameters. + * + * Deprecated:3.0: Use gtk_render_frame() and gtk_render_background() instead */ void gtk_paint_box (GtkStyle *style, @@ -3926,8 +3955,10 @@ gtk_paint_box (GtkStyle *style, * @y: y origin of the box * @width: the width of the box * @height: the height of the box - * + * * Draws a flat box on @cr with the given parameters. + * + * Deprecated:3.0: Use gtk_render_frame() and gtk_render_background() instead */ void gtk_paint_flat_box (GtkStyle *style, @@ -3968,9 +3999,11 @@ gtk_paint_flat_box (GtkStyle *style, * @y: y origin of the rectangle to draw the check in * @width: the width of the rectangle to draw the check in * @height: the height of the rectangle to draw the check in - * - * Draws a check button indicator in the given rectangle on @cr with + * + * Draws a check button indicator in the given rectangle on @cr with * the given parameters. + * + * Deprecated:3.0: Use gtk_render_check() instead */ void gtk_paint_check (GtkStyle *style, @@ -4010,8 +4043,10 @@ gtk_paint_check (GtkStyle *style, * @width: the width of the rectangle to draw the option in * @height: the height of the rectangle to draw the option in * - * Draws a radio button indicator in the given rectangle on @cr with + * Draws a radio button indicator in the given rectangle on @cr with * the given parameters. + * + * Deprecated:3.0: Use gtk_render_option() instead */ void gtk_paint_option (GtkStyle *style, @@ -4053,7 +4088,9 @@ gtk_paint_option (GtkStyle *style, * * Draws an option menu tab (i.e. the up and down pointing arrows) * in the given rectangle on @cr using the given parameters. - */ + * + * Deprecated:3.0: Use cairo instead + */ void gtk_paint_tab (GtkStyle *style, cairo_t *cr, @@ -4096,9 +4133,11 @@ gtk_paint_tab (GtkStyle *style, * @gap_width: width of the gap * * Draws a shadow around the given rectangle in @cr - * using the given style and state and shadow type, leaving a + * using the given style and state and shadow type, leaving a * gap in one side. -*/ + * + * Deprecated:3.0: Use gtk_render_frame_gap() instead + */ void gtk_paint_shadow_gap (GtkStyle *style, cairo_t *cr, @@ -4145,8 +4184,10 @@ gtk_paint_shadow_gap (GtkStyle *style, * @gap_x: starting position of the gap * @gap_width: width of the gap * - * Draws a box in @cr using the given style and state and shadow type, + * Draws a box in @cr using the given style and state and shadow type, * leaving a gap in one side. + * + * Deprecated:3.0: Use gtk_render_frame_gap() instead */ void gtk_paint_box_gap (GtkStyle *style, @@ -4179,7 +4220,7 @@ gtk_paint_box_gap (GtkStyle *style, } /** - * gtk_paint_extension: + * gtk_paint_extension: * @style: a #GtkStyle * @cr: a #cairo_t * @state_type: a state @@ -4191,8 +4232,10 @@ gtk_paint_box_gap (GtkStyle *style, * @width: width of the extension * @height: width of the extension * @gap_side: the side on to which the extension is attached - * + * * Draws an extension, i.e. a notebook tab. + * + * Deprecated:3.0: Use gtk_render_extension() instead **/ void gtk_paint_extension (GtkStyle *style, @@ -4236,6 +4279,8 @@ gtk_paint_extension (GtkStyle *style, * * Draws a focus indicator around the given rectangle on @cr using the * given style. + * + * Deprecated:3.0: Use gtk_render_focus() instead */ void gtk_paint_focus (GtkStyle *style, @@ -4279,6 +4324,8 @@ gtk_paint_focus (GtkStyle *style, * * Draws a slider in the given rectangle on @cr using the * given style and orientation. + * + * Deprecated:3.0: Use gtk_render_slider() instead **/ void gtk_paint_slider (GtkStyle *style, @@ -4321,8 +4368,10 @@ gtk_paint_slider (GtkStyle *style, * @width: with of the handle * @height: height of the handle * @orientation: the orientation of the handle - * + * * Draws a handle as used in #GtkHandleBox and #GtkPaned. + * + * Deprecated:3.0: Use gtk_render_handle() instead **/ void gtk_paint_handle (GtkStyle *style, @@ -4364,7 +4413,7 @@ gtk_paint_handle (GtkStyle *style, * @expander_style: the style to draw the expander in; determines * whether the expander is collapsed, expanded, or in an * intermediate state. - * + * * Draws an expander as used in #GtkTreeView. @x and @y specify the * center the expander. The size of the expander is determined by the * "expander-size" style property of @widget. (If widget is not @@ -4374,6 +4423,8 @@ gtk_paint_handle (GtkStyle *style, * likely not useful.) The expander is expander_size pixels tall * in the collapsed position and expander_size pixels wide in the * expanded position. + * + * Deprecated:3.0: Use gtk_render_expander() instead **/ void gtk_paint_expander (GtkStyle *style, @@ -4412,6 +4463,8 @@ gtk_paint_expander (GtkStyle *style, * @layout: the layout to draw * * Draws a layout on @cr using the given parameters. + * + * Deprecated:3.0: Use gtk_render_layout() instead **/ void gtk_paint_layout (GtkStyle *style, @@ -4451,7 +4504,9 @@ gtk_paint_layout (GtkStyle *style, * @height: the height of the rectangle in which to draw the resize grip * * Draws a resize grip in the given rectangle on @cr using the given - * parameters. + * parameters. + * + * Deprecated:3.0: Use gtk_render_handle() instead */ void gtk_paint_resize_grip (GtkStyle *style, @@ -4491,6 +4546,8 @@ gtk_paint_resize_grip (GtkStyle *style, * @height: the height of the rectangle in which to draw the spinner * * Draws a spinner on @window using the given parameters. + * + * Deprecated:3.0: Use gtk_render_activity() instead */ void gtk_paint_spinner (GtkStyle *style, @@ -4521,8 +4578,8 @@ gtk_paint_spinner (GtkStyle *style, * gtk_border_new: * * Allocates a new #GtkBorder structure and initializes its elements to zero. - * - * Returns: a new empty #GtkBorder. The newly allocated #GtkBorder should be + * + * Returns: a new empty #GtkBorder. The newly allocated #GtkBorder should be * freed with gtk_border_free() * * Since: 2.14 @@ -4677,7 +4734,7 @@ _gtk_widget_get_cursor_color (GtkWidget *widget, * right-to-left. Should never be #GTK_TEXT_DIR_NONE * @draw_arrow: %TRUE to draw a directional arrow on the * cursor. Should be %FALSE unless the cursor is split. - * + * * Draws a text caret on @cr at @location. This is not a style function * but merely a convenience function for drawing the standard cursor shape. * diff --git a/gtk/gtkstyle.h b/gtk/gtkstyle.h index d57c4371a3..8bd38ec755 100644 --- a/gtk/gtkstyle.h +++ b/gtk/gtkstyle.h @@ -401,6 +401,13 @@ struct _GtkBorder gint16 bottom; }; +GType gtk_border_get_type (void) G_GNUC_CONST; +GtkBorder *gtk_border_new (void) G_GNUC_MALLOC; +GtkBorder *gtk_border_copy (const GtkBorder *border_); +void gtk_border_free (GtkBorder *border_); + +#if !defined(GTK_DISABLE_DEPRECATED) || defined(GTK_COMPILATION) + GType gtk_style_get_type (void) G_GNUC_CONST; GtkStyle* gtk_style_new (void); GtkStyle* gtk_style_copy (GtkStyle *style); @@ -637,12 +644,6 @@ void gtk_paint_spinner (GtkStyle *style, gint width, gint height); - -GType gtk_border_get_type (void) G_GNUC_CONST; -GtkBorder *gtk_border_new (void) G_GNUC_MALLOC; -GtkBorder *gtk_border_copy (const GtkBorder *border_); -void gtk_border_free (GtkBorder *border_); - void gtk_style_get_style_property (GtkStyle *style, GType widget_type, const gchar *property_name, @@ -656,6 +657,8 @@ void gtk_style_get (GtkStyle *style, const gchar *first_property_name, ...) G_GNUC_NULL_TERMINATED; +#endif + /* --- private API --- */ const GValue* _gtk_style_peek_property_value (GtkStyle *style, GType widget_type, diff --git a/gtk/gtkthemes.h b/gtk/gtkthemes.h index 49d3e511dc..91edccc109 100644 --- a/gtk/gtkthemes.h +++ b/gtk/gtkthemes.h @@ -39,10 +39,14 @@ G_BEGIN_DECLS #define GTK_THEME_ENGINE(theme_engine) (G_TYPE_CHECK_INSTANCE_CAST ((theme_engine), GTK_TYPE_THEME_ENGINE, GtkThemeEngine)) #define GTK_IS_THEME_ENGINE(theme_engine) (G_TYPE_CHECK_INSTANCE_TYPE ((theme_engine), GTK_TYPE_THEME_ENGINE)) +#if !defined(GTK_DISABLE_DEPRECATED) || defined(GTK_COMPILATION) + GType gtk_theme_engine_get_type (void) G_GNUC_CONST; GtkThemeEngine *gtk_theme_engine_get (const gchar *name); GtkRcStyle *gtk_theme_engine_create_rc_style (GtkThemeEngine *engine); +#endif + G_END_DECLS #endif /* __GTK_THEMES_H__ */ diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index c8eceae779..324ed3d318 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -7673,6 +7673,8 @@ gtk_widget_style_attach (GtkWidget *widget) * mechanism, %FALSE otherwise. * * Since: 2.20 + * + * Deprecated:3.0: Use #GtkStyleContext instead **/ gboolean gtk_widget_has_rc_style (GtkWidget *widget) @@ -7692,6 +7694,8 @@ gtk_widget_has_rc_style (GtkWidget *widget) * want to use this function; it interacts badly with themes, because * themes work by replacing the #GtkStyle. Instead, use * gtk_widget_modify_style(). + * + * Deprecated:3.0: Use #GtkStyleContext instead **/ void gtk_widget_set_style (GtkWidget *widget, @@ -7725,6 +7729,8 @@ gtk_widget_set_style (GtkWidget *widget, * function; most of the time, if you want the style, the widget is * realized, and realized widgets are guaranteed to have a style * already. + * + * Deprecated:3.0: Use #GtkStyleContext instead **/ void gtk_widget_ensure_style (GtkWidget *widget) @@ -7781,6 +7787,8 @@ gtk_widget_reset_rc_style (GtkWidget *widget) * Simply an accessor function that returns @widget->style. * * Return value: (transfer none): the widget's #GtkStyle + * + * Deprecated:3.0: Use #GtkStyleContext instead **/ GtkStyle* gtk_widget_get_style (GtkWidget *widget) @@ -7812,6 +7820,8 @@ gtk_widget_get_style (GtkWidget *widget) * if you first call gtk_widget_modify_style(), subsequent calls * to such functions gtk_widget_modify_fg() will have a cumulative * effect with the initial modifications. + * + * Deprecated:3.0: Use #GtkStyleContext with a custom #GtkStyleProvider instead **/ void gtk_widget_modify_style (GtkWidget *widget, @@ -7850,12 +7860,15 @@ gtk_widget_modify_style (GtkWidget *widget, * thus dropping any reference to the old modifier style. Add a reference * to the modifier style if you want to keep it alive. * - * Return value: (transfer none): the modifier style for the widget. This rc style is - * owned by the widget. If you want to keep a pointer to value this - * around, you must add a refcount using g_object_ref(). + * Return value: (transfer none): the modifier style for the widget. + * This rc style is owned by the widget. If you want to keep a + * pointer to value this around, you must add a refcount using + * g_object_ref(). + * + * Deprecated:3.0: Use #GtkStyleContext with a custom #GtkStyleProvider instead **/ GtkRcStyle * -gtk_widget_get_modifier_style (GtkWidget *widget) +gtk_widget_get_modifier_style (GtkWidget *widget) { GtkRcStyle *rc_style; @@ -8083,7 +8096,8 @@ gtk_widget_override_font (GtkWidget *widget, * gtk_widget_override_symbolic_color(). * * Sets a symbolic color for a widget, All other style values are left - * untouched. See gtk_widget_override_color(). + * untouched. See gtk_widget_override_color() for overriding the foreground + * or background color. * * Since: 3.0 **/ @@ -8126,6 +8140,8 @@ gtk_widget_override_symbolic_color (GtkWidget *widget, * Sets the foreground color for a widget in a particular state. * All other style values are left untouched. See also * gtk_widget_modify_style(). + * + * Deprecated:3.0: Use gtk_widget_override_color() instead **/ void gtk_widget_modify_fg (GtkWidget *widget, @@ -8189,6 +8205,8 @@ gtk_widget_modify_fg (GtkWidget *widget, * on their parent; if you want to set the background of a rectangular * area around a label, try placing the label in a #GtkEventBox widget * and setting the background color on that. + * + * Deprecated:3.0: Use gtk_widget_override_background_color() instead **/ void gtk_widget_modify_bg (GtkWidget *widget, @@ -8246,6 +8264,8 @@ gtk_widget_modify_bg (GtkWidget *widget, * color used along with the base color (see gtk_widget_modify_base()) * for widgets such as #GtkEntry and #GtkTextView. See also * gtk_widget_modify_style(). + * + * Deprecated:3.0: Use gtk_widget_override_color() instead **/ void gtk_widget_modify_text (GtkWidget *widget, @@ -8279,6 +8299,8 @@ gtk_widget_modify_text (GtkWidget *widget, * parent; if you want to set the background of a rectangular area around * a label, try placing the label in a #GtkEventBox widget and setting * the base color on that. + * + * Deprecated:3.0: Use gtk_widget_override_background_color() instead **/ void gtk_widget_modify_base (GtkWidget *widget, @@ -8363,6 +8385,8 @@ gtk_widget_modify_cursor (GtkWidget *widget, * * Sets the font to use for a widget. All other style values are left * untouched. See also gtk_widget_modify_style(). + * + * Deprecated:3.0: Use gtk_widget_override_font() instead **/ void gtk_widget_modify_font (GtkWidget *widget, @@ -8669,6 +8693,8 @@ gtk_widget_reset_style (GtkWidget *widget) * for the currently loaded RC file settings. * * This function is not useful for applications. + * + * Deprecated:3.0: Use #GtkStyleContext instead */ void gtk_widget_reset_rc_styles (GtkWidget *widget) @@ -8683,8 +8709,10 @@ gtk_widget_reset_rc_styles (GtkWidget *widget) * * Returns the default style used by all widgets initially. * - * Returns: (transfer none): the default style. This #GtkStyle object is owned - * by GTK+ and should not be modified or freed. + * Returns: (transfer none): the default style. This #GtkStyle + * object is owned by GTK+ and should not be modified or freed. + * + * Deprecated:3.0: Use #GtkStyleContext instead */ GtkStyle* gtk_widget_get_default_style (void) @@ -11443,9 +11471,12 @@ gtk_widget_style_get (GtkWidget *widget, /** * gtk_widget_path: * @widget: a #GtkWidget - * @path_length: (out) (allow-none): location to store length of the path, or %NULL - * @path: (out) (allow-none): location to store allocated path string, or %NULL - * @path_reversed: (out) (allow-none): location to store allocated reverse path string, or %NULL + * @path_length: (out) (allow-none): location to store length of the path, + * or %NULL + * @path: (out) (allow-none): location to store allocated path string, + * or %NULL + * @path_reversed: (out) (allow-none): location to store allocated reverse + * path string, or %NULL * * Obtains the full path to @widget. The path is simply the name of a * widget and all its parents in the container hierarchy, separated by @@ -11459,6 +11490,8 @@ gtk_widget_style_get (GtkWidget *widget, * file. @path_reversed_p fills in the path in reverse order, * i.e. starting with @widget's name instead of starting with the name * of @widget's outermost ancestor. + * + * Deprecated:3.0: Use gtk_widget_get_path() instead **/ void gtk_widget_path (GtkWidget *widget, @@ -11516,14 +11549,17 @@ gtk_widget_path (GtkWidget *widget, /** * gtk_widget_class_path: * @widget: a #GtkWidget - * @path_length: (out) (allow-none): location to store the length of the class path, or %NULL - * @path: (out) (allow-none): location to store the class path as an allocated string, or %NULL - * @path_reversed: (out) (allow-none): location to store the reverse class path as an allocated - * string, or %NULL + * @path_length: (out) (allow-none): location to store the length of the + * class path, or %NULL + * @path: (out) (allow-none): location to store the class path as an + * allocated string, or %NULL + * @path_reversed: (out) (allow-none): location to store the reverse + * class path as an allocated string, or %NULL * * Same as gtk_widget_path(), but always uses the name of a widget's type, * never uses a custom name set with gtk_widget_set_name(). * + * Deprecated:3.0: Use gtk_widget_get_path() instead **/ void gtk_widget_class_path (GtkWidget *widget, diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h index eea8c7a0f4..6240c64338 100644 --- a/gtk/gtkwidget.h +++ b/gtk/gtkwidget.h @@ -773,10 +773,12 @@ void gtk_widget_override_symbolic_color (GtkWidget *widget, const gchar *name, const GdkRGBA *color); -/* Widget styles. - */ void gtk_widget_style_attach (GtkWidget *widget); +#if !defined(GTK_DISABLE_DEPRECATED) || defined(GTK_COMPILATION) + +/* Widget styles. + */ gboolean gtk_widget_has_rc_style (GtkWidget *widget); void gtk_widget_set_style (GtkWidget *widget, GtkStyle *style); @@ -804,6 +806,27 @@ void gtk_widget_modify_cursor (GtkWidget *widget, void gtk_widget_modify_font (GtkWidget *widget, PangoFontDescription *font_desc); +/* Descend recursively and set rc-style on all widgets without user styles */ +void gtk_widget_reset_rc_styles (GtkWidget *widget); +void gtk_widget_reset_style (GtkWidget *widget); + +/* Set certain default values to be used at widget creation time */ +GtkStyle* gtk_widget_get_default_style (void); + +/* Compute a widget's path in the form "GtkWindow.MyLabel", and + * return newly alocated strings. + */ +void gtk_widget_path (GtkWidget *widget, + guint *path_length, + gchar **path, + gchar **path_reversed); +void gtk_widget_class_path (GtkWidget *widget, + guint *path_length, + gchar **path, + gchar **path_reversed); + +#endif /* GTK_DISABLE_DEPRECATED */ + PangoContext *gtk_widget_create_pango_context (GtkWidget *widget); PangoContext *gtk_widget_get_pango_context (GtkWidget *widget); PangoLayout *gtk_widget_create_pango_layout (GtkWidget *widget, @@ -821,11 +844,6 @@ void gtk_widget_set_composite_name (GtkWidget *widget, const gchar *name); gchar* gtk_widget_get_composite_name (GtkWidget *widget); -/* Descend recursively and set rc-style on all widgets without user styles */ -void gtk_widget_reset_rc_styles (GtkWidget *widget); - -void gtk_widget_reset_style (GtkWidget *widget); - /* Push/pop pairs, to change default values upon a widget's creation. * This will override the values that got set by the * gtk_widget_set_default_* () functions. @@ -854,13 +872,7 @@ void gtk_widget_style_get (GtkWidget *widget, const gchar *first_property_name, ...) G_GNUC_NULL_TERMINATED; - -/* Set certain default values to be used at widget creation time. - */ -GtkStyle* gtk_widget_get_default_style (void); - -/* Functions for setting directionality for widgets - */ +/* Functions for setting directionality for widgets */ void gtk_widget_set_direction (GtkWidget *widget, GtkTextDirection dir); @@ -882,18 +894,6 @@ void gtk_widget_input_shape_combine_region (GtkWidget *widget, /* internal function */ void gtk_widget_reset_shapes (GtkWidget *widget); -/* Compute a widget's path in the form "GtkWindow.MyLabel", and - * return newly alocated strings. - */ -void gtk_widget_path (GtkWidget *widget, - guint *path_length, - gchar **path, - gchar **path_reversed); -void gtk_widget_class_path (GtkWidget *widget, - guint *path_length, - gchar **path, - gchar **path_reversed); - GList* gtk_widget_list_mnemonic_labels (GtkWidget *widget); void gtk_widget_add_mnemonic_label (GtkWidget *widget, GtkWidget *label);