mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
API: Remove GtkStyle
All the remaining gtkrc.c stuff like GtkRcStyle goes with it.
This commit is contained in:
parent
05763e4875
commit
0df388051d
@ -6338,110 +6338,6 @@ GTK_TYPE_GRADIENT
|
||||
gtk_gradient_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkstyle</FILE>
|
||||
<TITLE>GtkStyle</TITLE>
|
||||
GTK_STYLE_ATTACHED
|
||||
GtkStyle
|
||||
GtkStyleClass
|
||||
GtkExpanderStyle
|
||||
gtk_style_new
|
||||
gtk_style_copy
|
||||
gtk_style_attach
|
||||
gtk_style_detach
|
||||
gtk_style_has_context
|
||||
gtk_style_set_background
|
||||
gtk_style_apply_default_background
|
||||
gtk_style_lookup_color
|
||||
gtk_style_lookup_icon_set
|
||||
gtk_style_render_icon
|
||||
gtk_style_get_style_property
|
||||
gtk_style_get_valist
|
||||
gtk_style_get
|
||||
gtk_paint_arrow
|
||||
gtk_paint_box
|
||||
gtk_paint_box_gap
|
||||
gtk_paint_check
|
||||
gtk_paint_diamond
|
||||
gtk_paint_extension
|
||||
gtk_paint_flat_box
|
||||
gtk_paint_focus
|
||||
gtk_paint_handle
|
||||
gtk_paint_hline
|
||||
gtk_paint_option
|
||||
gtk_paint_shadow
|
||||
gtk_paint_shadow_gap
|
||||
gtk_paint_slider
|
||||
gtk_paint_spinner
|
||||
gtk_paint_tab
|
||||
gtk_paint_vline
|
||||
gtk_paint_expander
|
||||
gtk_paint_layout
|
||||
gtk_paint_resize_grip
|
||||
gtk_draw_insertion_cursor
|
||||
|
||||
<SUBSECTION>
|
||||
GtkRcProperty
|
||||
GtkRcPropertyParser
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_STYLE
|
||||
GTK_IS_STYLE
|
||||
GTK_TYPE_STYLE
|
||||
GTK_STYLE_CLASS
|
||||
GTK_IS_STYLE_CLASS
|
||||
GTK_STYLE_GET_CLASS
|
||||
|
||||
gtk_style_get_type
|
||||
GtkThemeEngine
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkrc</FILE>
|
||||
<TITLE>Resource Files</TITLE>
|
||||
GtkRcStyle
|
||||
GtkRcStyleClass
|
||||
GtkRcFlags
|
||||
GtkRcTokenType
|
||||
GtkPathPriorityType
|
||||
GtkPathType
|
||||
gtk_rc_scanner_new
|
||||
gtk_rc_get_style
|
||||
gtk_rc_get_style_by_paths
|
||||
gtk_rc_parse
|
||||
gtk_rc_parse_string
|
||||
gtk_rc_reparse_all
|
||||
gtk_rc_reparse_all_for_settings
|
||||
gtk_rc_reset_styles
|
||||
gtk_rc_add_default_file
|
||||
gtk_rc_get_default_files
|
||||
gtk_rc_set_default_files
|
||||
gtk_rc_parse_color
|
||||
gtk_rc_parse_color_full
|
||||
gtk_rc_parse_state
|
||||
gtk_rc_parse_priority
|
||||
gtk_rc_find_module_in_path
|
||||
gtk_rc_find_pixmap_in_path
|
||||
gtk_rc_get_module_dir
|
||||
gtk_rc_get_im_module_path
|
||||
gtk_rc_get_im_module_file
|
||||
gtk_rc_get_theme_dir
|
||||
gtk_rc_style_new
|
||||
gtk_rc_style_copy
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_RC_STYLE
|
||||
GTK_IS_RC_STYLE
|
||||
GTK_TYPE_RC_STYLE
|
||||
GTK_RC_STYLE_CLASS
|
||||
GTK_IS_RC_STYLE_CLASS
|
||||
GTK_RC_STYLE_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_rc_style_get_type
|
||||
GtkRcContext
|
||||
GTK_PATH_PRIO_MASK
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkselection</FILE>
|
||||
<TITLE>Selections</TITLE>
|
||||
@ -6818,7 +6714,6 @@ gtk_icon_info_load_icon_finish
|
||||
gtk_icon_info_load_symbolic
|
||||
gtk_icon_info_load_symbolic_async
|
||||
gtk_icon_info_load_symbolic_finish
|
||||
gtk_icon_info_load_symbolic_for_style
|
||||
gtk_icon_info_load_symbolic_for_context
|
||||
gtk_icon_info_load_symbolic_for_context_async
|
||||
gtk_icon_info_load_symbolic_for_context_finish
|
||||
@ -6869,7 +6764,6 @@ gtk_icon_set_copy
|
||||
gtk_icon_set_new
|
||||
gtk_icon_set_new_from_pixbuf
|
||||
gtk_icon_set_ref
|
||||
gtk_icon_set_render_icon
|
||||
gtk_icon_set_render_icon_pixbuf
|
||||
gtk_icon_set_render_icon_surface
|
||||
gtk_icon_set_unref
|
||||
|
@ -18,10 +18,8 @@ deprecated_h_sources = \
|
||||
deprecated/gtkimagemenuitem.h \
|
||||
deprecated/gtkmisc.h \
|
||||
deprecated/gtkradioaction.h \
|
||||
deprecated/gtkrc.h \
|
||||
deprecated/gtkrecentaction.h \
|
||||
deprecated/gtkstock.h \
|
||||
deprecated/gtkstyle.h \
|
||||
deprecated/gtkstyleproperties.h \
|
||||
deprecated/gtksymboliccolor.h \
|
||||
deprecated/gtktable.h \
|
||||
@ -61,10 +59,8 @@ deprecated_c_sources = \
|
||||
deprecated/gtkimagemenuitem.c \
|
||||
deprecated/gtkmisc.c \
|
||||
deprecated/gtkradioaction.c \
|
||||
deprecated/gtkrc.c \
|
||||
deprecated/gtkrecentaction.c \
|
||||
deprecated/gtkstock.c \
|
||||
deprecated/gtkstyle.c \
|
||||
deprecated/gtkstyleproperties.c \
|
||||
deprecated/gtksymboliccolor.c \
|
||||
deprecated/gtktable.c \
|
||||
|
@ -43,7 +43,6 @@
|
||||
#include "gtkbuildable.h"
|
||||
#include "gtkbuilderprivate.h"
|
||||
#include "gtktypebuiltins.h"
|
||||
#include "gtkstyle.h"
|
||||
#include "gtkstylecontextprivate.h"
|
||||
#include "gtkrender.h"
|
||||
#include "gtkrenderprivate.h"
|
||||
@ -1556,92 +1555,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||
return surface;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_icon_set_render_icon:
|
||||
* @icon_set: a #GtkIconSet
|
||||
* @style: (allow-none): a #GtkStyle associated with @widget, or %NULL
|
||||
* @direction: text direction
|
||||
* @state: widget state
|
||||
* @size: (type int): icon size (#GtkIconSize). A size of `(GtkIconSize)-1`
|
||||
* means render at the size of the source and don’t scale.
|
||||
* @widget: (allow-none): widget that will display the icon, or %NULL.
|
||||
* The only use that is typically made of this
|
||||
* is to determine the appropriate #GdkScreen.
|
||||
* @detail: (allow-none): detail to pass to the theme engine, or %NULL.
|
||||
* Note that passing a detail of anything but %NULL
|
||||
* will disable caching.
|
||||
*
|
||||
* Renders an icon using gtk_style_render_icon(). In most cases,
|
||||
* gtk_widget_render_icon() is better, since it automatically provides
|
||||
* most of the arguments from the current widget settings. This
|
||||
* function never returns %NULL; if the icon can’t be rendered
|
||||
* (perhaps because an image file fails to load), a default "missing
|
||||
* image" icon will be returned instead.
|
||||
*
|
||||
* Returns: (transfer full): a #GdkPixbuf to be displayed
|
||||
*
|
||||
* Deprecated: 3.0: Use gtk_icon_set_render_icon_pixbuf() instead
|
||||
*/
|
||||
GdkPixbuf*
|
||||
gtk_icon_set_render_icon (GtkIconSet *icon_set,
|
||||
GtkStyle *style,
|
||||
GtkTextDirection direction,
|
||||
GtkStateType state,
|
||||
GtkIconSize size,
|
||||
GtkWidget *widget,
|
||||
const char *detail)
|
||||
{
|
||||
GdkPixbuf *icon;
|
||||
GtkStyleContext *context = NULL;
|
||||
GtkStateFlags flags = 0;
|
||||
|
||||
g_return_val_if_fail (icon_set != NULL, NULL);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||
|
||||
g_return_val_if_fail (style == NULL || GTK_IS_STYLE (style), NULL);
|
||||
|
||||
if (style && gtk_style_has_context (style))
|
||||
{
|
||||
g_object_get (style, "context", &context, NULL);
|
||||
/* g_object_get returns a refed object */
|
||||
if (context)
|
||||
g_object_unref (context);
|
||||
}
|
||||
else if (widget)
|
||||
{
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
}
|
||||
|
||||
if (!context)
|
||||
return render_fallback_image (gtk_style_context_lookup_style (context), direction, state, size);
|
||||
|
||||
gtk_style_context_save (context);
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case GTK_STATE_PRELIGHT:
|
||||
flags |= GTK_STATE_FLAG_PRELIGHT;
|
||||
break;
|
||||
case GTK_STATE_INSENSITIVE:
|
||||
flags |= GTK_STATE_FLAG_INSENSITIVE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
gtk_style_context_set_state (context, flags);
|
||||
gtk_style_context_set_direction (context, direction);
|
||||
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||
|
||||
icon = gtk_icon_set_render_icon_pixbuf (icon_set, context, size);
|
||||
|
||||
gtk_style_context_restore (context);
|
||||
|
||||
return icon;
|
||||
}
|
||||
|
||||
/* Order sources by their "wildness", so that "wilder" sources are
|
||||
* greater than “specific” sources; for determining ordering,
|
||||
* direction beats state beats size.
|
||||
|
@ -146,15 +146,6 @@ void gtk_icon_set_unref (GtkIconSet *icon_set);
|
||||
GDK_DEPRECATED_IN_3_10
|
||||
GtkIconSet* gtk_icon_set_copy (GtkIconSet *icon_set);
|
||||
|
||||
GDK_DEPRECATED_IN_3_0_FOR(gtk_icon_set_render_icon_pixbuf)
|
||||
GdkPixbuf* gtk_icon_set_render_icon (GtkIconSet *icon_set,
|
||||
GtkStyle *style,
|
||||
GtkTextDirection direction,
|
||||
GtkStateType state,
|
||||
GtkIconSize size,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail);
|
||||
|
||||
GDK_DEPRECATED_IN_3_10
|
||||
void gtk_icon_set_add_source (GtkIconSet *icon_set,
|
||||
const GtkIconSource *source);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,405 +0,0 @@
|
||||
/* GTK - The GIMP Toolkit
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __GTK_RC_H__
|
||||
#define __GTK_RC_H__
|
||||
|
||||
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gtk/gtk.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gtk/gtkwidget.h>
|
||||
#include <gtk/gtkbindings.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
/* Forward declarations */
|
||||
typedef struct _GtkRcContext GtkRcContext;
|
||||
typedef struct _GtkRcStyleClass GtkRcStyleClass;
|
||||
|
||||
#define GTK_TYPE_RC_STYLE (gtk_rc_style_get_type ())
|
||||
#define GTK_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_RC_STYLE, GtkRcStyle))
|
||||
#define GTK_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_RC_STYLE, GtkRcStyleClass))
|
||||
#define GTK_IS_RC_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GTK_TYPE_RC_STYLE))
|
||||
#define GTK_IS_RC_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_RC_STYLE))
|
||||
#define GTK_RC_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_RC_STYLE, GtkRcStyleClass))
|
||||
|
||||
/**
|
||||
* GtkRcFlags:
|
||||
* @GTK_RC_FG :Deprecated
|
||||
* @GTK_RC_BG: Deprecated
|
||||
* @GTK_RC_TEXT: Deprecated
|
||||
* @GTK_RC_BASE: Deprecated
|
||||
*
|
||||
* Deprecated
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GTK_RC_FG = 1 << 0,
|
||||
GTK_RC_BG = 1 << 1,
|
||||
GTK_RC_TEXT = 1 << 2,
|
||||
GTK_RC_BASE = 1 << 3
|
||||
} GtkRcFlags;
|
||||
|
||||
/**
|
||||
* GtkRcStyle:
|
||||
* @name: Name
|
||||
* @bg_pixmap_name: Pixmap name
|
||||
* @font_desc: A #PangoFontDescription
|
||||
* @color_flags: #GtkRcFlags
|
||||
* @fg: Foreground colors
|
||||
* @bg: Background colors
|
||||
* @text: Text colors
|
||||
* @base: Base colors
|
||||
* @xthickness: X thickness
|
||||
* @ythickness: Y thickness
|
||||
*
|
||||
* The #GtkRcStyle-struct is used to represent a set
|
||||
* of information about the appearance of a widget.
|
||||
* This can later be composited together with other
|
||||
* #GtkRcStyle-struct<!-- -->s to form a #GtkStyle.
|
||||
*/
|
||||
struct _GtkRcStyle
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
/*< public >*/
|
||||
|
||||
gchar *name;
|
||||
gchar *bg_pixmap_name[5];
|
||||
PangoFontDescription *font_desc;
|
||||
|
||||
GtkRcFlags color_flags[5];
|
||||
GdkColor fg[5];
|
||||
GdkColor bg[5];
|
||||
GdkColor text[5];
|
||||
GdkColor base[5];
|
||||
|
||||
gint xthickness;
|
||||
gint ythickness;
|
||||
|
||||
/*< private >*/
|
||||
GArray *rc_properties;
|
||||
|
||||
/* list of RC style lists including this RC style */
|
||||
GSList *rc_style_lists;
|
||||
|
||||
GSList *icon_factories;
|
||||
|
||||
guint engine_specified : 1; /* The RC file specified the engine */
|
||||
};
|
||||
|
||||
/**
|
||||
* GtkRcStyleClass:
|
||||
* @parent_class: The parent class.
|
||||
* @create_rc_style:
|
||||
* @parse:
|
||||
* @merge:
|
||||
* @create_style:
|
||||
*/
|
||||
struct _GtkRcStyleClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
/*< public >*/
|
||||
|
||||
/* Create an empty RC style of the same type as this RC style.
|
||||
* The default implementation, which does
|
||||
* g_object_new (G_OBJECT_TYPE (style), NULL);
|
||||
* should work in most cases.
|
||||
*/
|
||||
GtkRcStyle * (*create_rc_style) (GtkRcStyle *rc_style);
|
||||
|
||||
/* Fill in engine specific parts of GtkRcStyle by parsing contents
|
||||
* of brackets. Returns G_TOKEN_NONE if successful, otherwise returns
|
||||
* the token it expected but didn't get.
|
||||
*/
|
||||
guint (*parse) (GtkRcStyle *rc_style,
|
||||
GtkSettings *settings,
|
||||
GScanner *scanner);
|
||||
|
||||
/* Combine RC style data from src into dest. If overridden, this
|
||||
* function should chain to the parent.
|
||||
*/
|
||||
void (*merge) (GtkRcStyle *dest,
|
||||
GtkRcStyle *src);
|
||||
|
||||
/* Create an empty style suitable to this RC style
|
||||
*/
|
||||
GtkStyle * (*create_style) (GtkRcStyle *rc_style);
|
||||
|
||||
/*< private >*/
|
||||
|
||||
/* Padding for future expansion */
|
||||
void (*_gtk_reserved1) (void);
|
||||
void (*_gtk_reserved2) (void);
|
||||
void (*_gtk_reserved3) (void);
|
||||
void (*_gtk_reserved4) (void);
|
||||
};
|
||||
|
||||
GSList* _gtk_rc_parse_widget_class_path (const gchar *pattern);
|
||||
void _gtk_rc_free_widget_class_path (GSList *list);
|
||||
gboolean _gtk_rc_match_widget_class (GSList *list,
|
||||
gint length,
|
||||
gchar *path,
|
||||
gchar *path_reversed);
|
||||
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
void gtk_rc_add_default_file (const gchar *filename);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
void gtk_rc_set_default_files (gchar **filenames);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
gchar** gtk_rc_get_default_files (void);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
GtkStyle* gtk_rc_get_style (GtkWidget *widget);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
GtkStyle* gtk_rc_get_style_by_paths (GtkSettings *settings,
|
||||
const char *widget_path,
|
||||
const char *class_path,
|
||||
GType type);
|
||||
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
gboolean gtk_rc_reparse_all_for_settings (GtkSettings *settings,
|
||||
gboolean force_load);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
void gtk_rc_reset_styles (GtkSettings *settings);
|
||||
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
gchar* gtk_rc_find_pixmap_in_path (GtkSettings *settings,
|
||||
GScanner *scanner,
|
||||
const gchar *pixmap_file);
|
||||
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
void gtk_rc_parse (const gchar *filename);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
void gtk_rc_parse_string (const gchar *rc_string);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
gboolean gtk_rc_reparse_all (void);
|
||||
|
||||
GDK_DEPRECATED_IN_3_0
|
||||
GType gtk_rc_style_get_type (void) G_GNUC_CONST;
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
GtkRcStyle* gtk_rc_style_new (void);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
GtkRcStyle* gtk_rc_style_copy (GtkRcStyle *orig);
|
||||
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
gchar* gtk_rc_find_module_in_path (const gchar *module_file);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
gchar* gtk_rc_get_theme_dir (void);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
gchar* gtk_rc_get_module_dir (void);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
gchar* gtk_rc_get_im_module_path (void);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
gchar* gtk_rc_get_im_module_file (void);
|
||||
|
||||
/* private functions/definitions */
|
||||
|
||||
/**
|
||||
* GtkRcTokenType:
|
||||
* @GTK_RC_TOKEN_INVALID: Deprecated
|
||||
* @GTK_RC_TOKEN_INCLUDE: Deprecated
|
||||
* @GTK_RC_TOKEN_NORMAL: Deprecated
|
||||
* @GTK_RC_TOKEN_ACTIVE: Deprecated
|
||||
* @GTK_RC_TOKEN_PRELIGHT: Deprecated
|
||||
* @GTK_RC_TOKEN_SELECTED: Deprecated
|
||||
* @GTK_RC_TOKEN_INSENSITIVE: Deprecated
|
||||
* @GTK_RC_TOKEN_FG: Deprecated
|
||||
* @GTK_RC_TOKEN_BG: Deprecated
|
||||
* @GTK_RC_TOKEN_TEXT: Deprecated
|
||||
* @GTK_RC_TOKEN_BASE: Deprecated
|
||||
* @GTK_RC_TOKEN_XTHICKNESS: Deprecated
|
||||
* @GTK_RC_TOKEN_YTHICKNESS: Deprecated
|
||||
* @GTK_RC_TOKEN_FONT: Deprecated
|
||||
* @GTK_RC_TOKEN_FONTSET: Deprecated
|
||||
* @GTK_RC_TOKEN_FONT_NAME: Deprecated
|
||||
* @GTK_RC_TOKEN_BG_PIXMAP: Deprecated
|
||||
* @GTK_RC_TOKEN_PIXMAP_PATH: Deprecated
|
||||
* @GTK_RC_TOKEN_STYLE: Deprecated
|
||||
* @GTK_RC_TOKEN_BINDING: Deprecated
|
||||
* @GTK_RC_TOKEN_BIND: Deprecated
|
||||
* @GTK_RC_TOKEN_WIDGET: Deprecated
|
||||
* @GTK_RC_TOKEN_WIDGET_CLASS: Deprecated
|
||||
* @GTK_RC_TOKEN_CLASS: Deprecated
|
||||
* @GTK_RC_TOKEN_LOWEST: Deprecated
|
||||
* @GTK_RC_TOKEN_GTK: Deprecated
|
||||
* @GTK_RC_TOKEN_APPLICATION: Deprecated
|
||||
* @GTK_RC_TOKEN_THEME: Deprecated
|
||||
* @GTK_RC_TOKEN_RC: Deprecated
|
||||
* @GTK_RC_TOKEN_HIGHEST: Deprecated
|
||||
* @GTK_RC_TOKEN_ENGINE: Deprecated
|
||||
* @GTK_RC_TOKEN_MODULE_PATH: Deprecated
|
||||
* @GTK_RC_TOKEN_IM_MODULE_PATH: Deprecated
|
||||
* @GTK_RC_TOKEN_IM_MODULE_FILE: Deprecated
|
||||
* @GTK_RC_TOKEN_STOCK: Deprecated
|
||||
* @GTK_RC_TOKEN_LTR: Deprecated
|
||||
* @GTK_RC_TOKEN_RTL: Deprecated
|
||||
* @GTK_RC_TOKEN_COLOR: Deprecated
|
||||
* @GTK_RC_TOKEN_UNBIND: Deprecated
|
||||
* @GTK_RC_TOKEN_LAST: Deprecated
|
||||
*
|
||||
* The #GtkRcTokenType enumeration represents the tokens
|
||||
* in the RC file. It is exposed so that theme engines
|
||||
* can reuse these tokens when parsing the theme-engine
|
||||
* specific portions of a RC file.
|
||||
*
|
||||
* Deprecated: 3.0: Use #GtkCssProvider instead.
|
||||
*/
|
||||
typedef enum {
|
||||
GTK_RC_TOKEN_INVALID = G_TOKEN_LAST,
|
||||
GTK_RC_TOKEN_INCLUDE,
|
||||
GTK_RC_TOKEN_NORMAL,
|
||||
GTK_RC_TOKEN_ACTIVE,
|
||||
GTK_RC_TOKEN_PRELIGHT,
|
||||
GTK_RC_TOKEN_SELECTED,
|
||||
GTK_RC_TOKEN_INSENSITIVE,
|
||||
GTK_RC_TOKEN_FG,
|
||||
GTK_RC_TOKEN_BG,
|
||||
GTK_RC_TOKEN_TEXT,
|
||||
GTK_RC_TOKEN_BASE,
|
||||
GTK_RC_TOKEN_XTHICKNESS,
|
||||
GTK_RC_TOKEN_YTHICKNESS,
|
||||
GTK_RC_TOKEN_FONT,
|
||||
GTK_RC_TOKEN_FONTSET,
|
||||
GTK_RC_TOKEN_FONT_NAME,
|
||||
GTK_RC_TOKEN_BG_PIXMAP,
|
||||
GTK_RC_TOKEN_PIXMAP_PATH,
|
||||
GTK_RC_TOKEN_STYLE,
|
||||
GTK_RC_TOKEN_BINDING,
|
||||
GTK_RC_TOKEN_BIND,
|
||||
GTK_RC_TOKEN_WIDGET,
|
||||
GTK_RC_TOKEN_WIDGET_CLASS,
|
||||
GTK_RC_TOKEN_CLASS,
|
||||
GTK_RC_TOKEN_LOWEST,
|
||||
GTK_RC_TOKEN_GTK,
|
||||
GTK_RC_TOKEN_APPLICATION,
|
||||
GTK_RC_TOKEN_THEME,
|
||||
GTK_RC_TOKEN_RC,
|
||||
GTK_RC_TOKEN_HIGHEST,
|
||||
GTK_RC_TOKEN_ENGINE,
|
||||
GTK_RC_TOKEN_MODULE_PATH,
|
||||
GTK_RC_TOKEN_IM_MODULE_PATH,
|
||||
GTK_RC_TOKEN_IM_MODULE_FILE,
|
||||
GTK_RC_TOKEN_STOCK,
|
||||
GTK_RC_TOKEN_LTR,
|
||||
GTK_RC_TOKEN_RTL,
|
||||
GTK_RC_TOKEN_COLOR,
|
||||
GTK_RC_TOKEN_UNBIND,
|
||||
GTK_RC_TOKEN_LAST
|
||||
} GtkRcTokenType;
|
||||
|
||||
|
||||
/**
|
||||
* GtkPathPriorityType:
|
||||
* @GTK_PATH_PRIO_LOWEST: Deprecated
|
||||
* @GTK_PATH_PRIO_GTK: Deprecated
|
||||
* @GTK_PATH_PRIO_APPLICATION: Deprecated
|
||||
* @GTK_PATH_PRIO_THEME: Deprecated
|
||||
* @GTK_PATH_PRIO_RC: Deprecated
|
||||
* @GTK_PATH_PRIO_HIGHEST: Deprecated
|
||||
*
|
||||
* Priorities for path lookups.
|
||||
* See also gtk_binding_set_add_path().
|
||||
*
|
||||
* Deprecated: 3.0
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GTK_PATH_PRIO_LOWEST = 0,
|
||||
GTK_PATH_PRIO_GTK = 4,
|
||||
GTK_PATH_PRIO_APPLICATION = 8,
|
||||
GTK_PATH_PRIO_THEME = 10,
|
||||
GTK_PATH_PRIO_RC = 12,
|
||||
GTK_PATH_PRIO_HIGHEST = 15
|
||||
} GtkPathPriorityType;
|
||||
#define GTK_PATH_PRIO_MASK 0x0f
|
||||
|
||||
/**
|
||||
* GtkPathType:
|
||||
* @GTK_PATH_WIDGET: Deprecated
|
||||
* @GTK_PATH_WIDGET_CLASS: Deprecated
|
||||
* @GTK_PATH_CLASS: Deprecated
|
||||
*
|
||||
* Widget path types.
|
||||
* See also gtk_binding_set_add_path().
|
||||
*
|
||||
* Deprecated: 3.0
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GTK_PATH_WIDGET,
|
||||
GTK_PATH_WIDGET_CLASS,
|
||||
GTK_PATH_CLASS
|
||||
} GtkPathType;
|
||||
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
GScanner* gtk_rc_scanner_new (void);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
guint gtk_rc_parse_color (GScanner *scanner,
|
||||
GdkColor *color);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
guint gtk_rc_parse_color_full (GScanner *scanner,
|
||||
GtkRcStyle *style,
|
||||
GdkColor *color);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
guint gtk_rc_parse_state (GScanner *scanner,
|
||||
GtkStateType *state);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
guint gtk_rc_parse_priority (GScanner *scanner,
|
||||
GtkPathPriorityType *priority);
|
||||
|
||||
/* rc properties
|
||||
* (structure forward declared in gtkstyle.h)
|
||||
*/
|
||||
/**
|
||||
* GtkRcProperty:
|
||||
* @type_name: quark-ified type identifier
|
||||
* @property_name: quark-ified property identifier like
|
||||
* “GtkScrollbar::spacing”
|
||||
* @origin: field similar to one found in #GtkSettingsValue
|
||||
* @value:field similar to one found in #GtkSettingsValue
|
||||
*
|
||||
* Deprecated
|
||||
*/
|
||||
struct _GtkRcProperty
|
||||
{
|
||||
/* quark-ified property identifier like “GtkScrollbar::spacing” */
|
||||
GQuark type_name;
|
||||
GQuark property_name;
|
||||
|
||||
/* fields similar to GtkSettingsValue */
|
||||
gchar *origin;
|
||||
GValue value;
|
||||
};
|
||||
|
||||
GDK_DEPRECATED_IN_3_0
|
||||
void gtk_binding_set_add_path (GtkBindingSet *binding_set,
|
||||
GtkPathType path_type,
|
||||
const gchar *path_pattern,
|
||||
GtkPathPriorityType priority);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_RC_H__ */
|
File diff suppressed because it is too large
Load Diff
@ -1,793 +0,0 @@
|
||||
/* GTK - The GIMP Toolkit
|
||||
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
||||
* file for a list of people on the GTK+ Team. See the ChangeLog
|
||||
* files for a list of changes. These files are distributed with
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
#ifndef __GTK_STYLE_H__
|
||||
#define __GTK_STYLE_H__
|
||||
|
||||
|
||||
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gtk/gtk.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include <gtk/gtkenums.h>
|
||||
#include <gtk/gtktypes.h>
|
||||
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GTK_TYPE_STYLE (gtk_style_get_type ())
|
||||
#define GTK_STYLE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GTK_TYPE_STYLE, GtkStyle))
|
||||
#define GTK_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_STYLE, GtkStyleClass))
|
||||
#define GTK_IS_STYLE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GTK_TYPE_STYLE))
|
||||
#define GTK_IS_STYLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_STYLE))
|
||||
#define GTK_STYLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_STYLE, GtkStyleClass))
|
||||
|
||||
/* Some forward declarations needed to rationalize the header
|
||||
* files.
|
||||
*/
|
||||
typedef struct _GtkStyleClass GtkStyleClass;
|
||||
typedef struct _GtkThemeEngine GtkThemeEngine;
|
||||
typedef struct _GtkRcProperty GtkRcProperty;
|
||||
|
||||
/**
|
||||
* GtkExpanderStyle:
|
||||
* @GTK_EXPANDER_COLLAPSED: The style used for a collapsed subtree.
|
||||
* @GTK_EXPANDER_SEMI_COLLAPSED: Intermediate style used during animation.
|
||||
* @GTK_EXPANDER_SEMI_EXPANDED: Intermediate style used during animation.
|
||||
* @GTK_EXPANDER_EXPANDED: The style used for an expanded subtree.
|
||||
*
|
||||
* Used to specify the style of the expanders drawn by a #GtkTreeView.
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
GTK_EXPANDER_COLLAPSED,
|
||||
GTK_EXPANDER_SEMI_COLLAPSED,
|
||||
GTK_EXPANDER_SEMI_EXPANDED,
|
||||
GTK_EXPANDER_EXPANDED
|
||||
} GtkExpanderStyle;
|
||||
|
||||
/**
|
||||
* GTK_STYLE_ATTACHED:
|
||||
* @style: a #GtkStyle.
|
||||
*
|
||||
* Returns: whether the style is attached to a window.
|
||||
*/
|
||||
#define GTK_STYLE_ATTACHED(style) (GTK_STYLE (style)->attach_count > 0)
|
||||
|
||||
/**
|
||||
* GtkStyle:
|
||||
* @fg: Set of foreground #GdkColor
|
||||
* @bg: Set of background #GdkColor
|
||||
* @light: Set of light #GdkColor
|
||||
* @dark: Set of dark #GdkColor
|
||||
* @mid: Set of mid #GdkColor
|
||||
* @text: Set of text #GdkColor
|
||||
* @base: Set of base #GdkColor
|
||||
* @text_aa: Color halfway between text/base
|
||||
* @black: #GdkColor to use for black
|
||||
* @white: #GdkColor to use for white
|
||||
* @font_desc: #PangoFontDescription
|
||||
* @xthickness: Thickness in X direction
|
||||
* @ythickness: Thickness in Y direction
|
||||
* @background: Set of background #cairo_pattern_t
|
||||
*/
|
||||
struct _GtkStyle
|
||||
{
|
||||
/*< private >*/
|
||||
GObject parent_instance;
|
||||
|
||||
/*< public >*/
|
||||
|
||||
GdkColor fg[5];
|
||||
GdkColor bg[5];
|
||||
GdkColor light[5];
|
||||
GdkColor dark[5];
|
||||
GdkColor mid[5];
|
||||
GdkColor text[5];
|
||||
GdkColor base[5];
|
||||
GdkColor text_aa[5]; /* Halfway between text/base */
|
||||
|
||||
GdkColor black;
|
||||
GdkColor white;
|
||||
PangoFontDescription *font_desc;
|
||||
|
||||
gint xthickness;
|
||||
gint ythickness;
|
||||
|
||||
cairo_pattern_t *background[5];
|
||||
|
||||
/*< private >*/
|
||||
|
||||
gint attach_count;
|
||||
|
||||
GdkVisual *visual;
|
||||
PangoFontDescription *private_font_desc; /* Font description for style->private_font or %NULL */
|
||||
|
||||
/* the RcStyle from which this style was created */
|
||||
GtkRcStyle *rc_style;
|
||||
|
||||
GSList *styles; /* of type GtkStyle* */
|
||||
GArray *property_cache;
|
||||
GSList *icon_factories; /* of type GtkIconFactory* */
|
||||
};
|
||||
|
||||
/**
|
||||
* GtkStyleClass:
|
||||
* @parent_class: The parent class.
|
||||
* @realize:
|
||||
* @unrealize:
|
||||
* @copy:
|
||||
* @clone:
|
||||
* @init_from_rc:
|
||||
* @set_background:
|
||||
* @render_icon:
|
||||
* @draw_hline:
|
||||
* @draw_vline:
|
||||
* @draw_shadow:
|
||||
* @draw_arrow:
|
||||
* @draw_diamond:
|
||||
* @draw_box:
|
||||
* @draw_flat_box:
|
||||
* @draw_check:
|
||||
* @draw_option:
|
||||
* @draw_tab:
|
||||
* @draw_shadow_gap:
|
||||
* @draw_box_gap:
|
||||
* @draw_extension:
|
||||
* @draw_focus:
|
||||
* @draw_slider:
|
||||
* @draw_handle:
|
||||
* @draw_expander:
|
||||
* @draw_layout:
|
||||
* @draw_resize_grip:
|
||||
* @draw_spinner:
|
||||
*/
|
||||
struct _GtkStyleClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
/*< public >*/
|
||||
|
||||
/* Initialize for a particular visual. style->visual
|
||||
* will have been set at this point. Will typically chain
|
||||
* to parent.
|
||||
*/
|
||||
void (*realize) (GtkStyle *style);
|
||||
|
||||
/* Clean up for a particular visual. Will typically chain
|
||||
* to parent.
|
||||
*/
|
||||
void (*unrealize) (GtkStyle *style);
|
||||
|
||||
/* Make style an exact duplicate of src.
|
||||
*/
|
||||
void (*copy) (GtkStyle *style,
|
||||
GtkStyle *src);
|
||||
|
||||
/* Create an empty style of the same type as this style.
|
||||
* The default implementation, which does
|
||||
* g_object_new (G_OBJECT_TYPE (style), NULL);
|
||||
* should work in most cases.
|
||||
*/
|
||||
GtkStyle *(*clone) (GtkStyle *style);
|
||||
|
||||
/* Initialize the GtkStyle with the values in the GtkRcStyle.
|
||||
* should chain to the parent implementation.
|
||||
*/
|
||||
void (*init_from_rc) (GtkStyle *style,
|
||||
GtkRcStyle *rc_style);
|
||||
|
||||
void (*set_background) (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type);
|
||||
|
||||
|
||||
GdkPixbuf * (* render_icon) (GtkStyle *style,
|
||||
const GtkIconSource *source,
|
||||
GtkTextDirection direction,
|
||||
GtkStateType state,
|
||||
GtkIconSize size,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail);
|
||||
|
||||
/* Drawing functions
|
||||
*/
|
||||
|
||||
void (*draw_hline) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x1,
|
||||
gint x2,
|
||||
gint y);
|
||||
void (*draw_vline) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint y1_,
|
||||
gint y2_,
|
||||
gint x);
|
||||
void (*draw_shadow) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void (*draw_arrow) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
GtkArrowType arrow_type,
|
||||
gboolean fill,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void (*draw_diamond) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void (*draw_box) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void (*draw_flat_box) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void (*draw_check) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void (*draw_option) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void (*draw_tab) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void (*draw_shadow_gap) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
GtkPositionType gap_side,
|
||||
gint gap_x,
|
||||
gint gap_width);
|
||||
void (*draw_box_gap) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
GtkPositionType gap_side,
|
||||
gint gap_x,
|
||||
gint gap_width);
|
||||
void (*draw_extension) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
GtkPositionType gap_side);
|
||||
void (*draw_focus) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void (*draw_slider) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
GtkOrientation orientation);
|
||||
void (*draw_handle) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
GtkOrientation orientation);
|
||||
|
||||
void (*draw_expander) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
GtkExpanderStyle expander_style);
|
||||
void (*draw_layout) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
gboolean use_text,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
PangoLayout *layout);
|
||||
void (*draw_resize_grip) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
GdkWindowEdge edge,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
void (*draw_spinner) (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
guint step,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
|
||||
/*< private >*/
|
||||
|
||||
/* Padding for future expansion */
|
||||
void (*_gtk_reserved1) (void);
|
||||
void (*_gtk_reserved2) (void);
|
||||
void (*_gtk_reserved3) (void);
|
||||
void (*_gtk_reserved4) (void);
|
||||
void (*_gtk_reserved5) (void);
|
||||
void (*_gtk_reserved6) (void);
|
||||
void (*_gtk_reserved7) (void);
|
||||
void (*_gtk_reserved8) (void);
|
||||
void (*_gtk_reserved9) (void);
|
||||
void (*_gtk_reserved10) (void);
|
||||
void (*_gtk_reserved11) (void);
|
||||
};
|
||||
|
||||
GDK_DEPRECATED_IN_3_0
|
||||
GType gtk_style_get_type (void) G_GNUC_CONST;
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
GtkStyle* gtk_style_new (void);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
GtkStyle* gtk_style_copy (GtkStyle *style);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
GtkStyle* gtk_style_attach (GtkStyle *style,
|
||||
GdkWindow *window);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
void gtk_style_detach (GtkStyle *style);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
void gtk_style_set_background (GtkStyle *style,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_background)
|
||||
void gtk_style_apply_default_background (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GdkWindow *window,
|
||||
GtkStateType state_type,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and a style class)
|
||||
GtkIconSet* gtk_style_lookup_icon_set (GtkStyle *style,
|
||||
const gchar *stock_id);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and a style class)
|
||||
gboolean gtk_style_lookup_color (GtkStyle *style,
|
||||
const gchar *color_name,
|
||||
GdkColor *color);
|
||||
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_icon)
|
||||
GdkPixbuf* gtk_style_render_icon (GtkStyle *style,
|
||||
const GtkIconSource *source,
|
||||
GtkTextDirection direction,
|
||||
GtkStateType state,
|
||||
GtkIconSize size,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail);
|
||||
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_line)
|
||||
void gtk_paint_hline (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x1,
|
||||
gint x2,
|
||||
gint y);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_line)
|
||||
void gtk_paint_vline (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint y1_,
|
||||
gint y2_,
|
||||
gint x);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_background)
|
||||
void gtk_paint_shadow (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_arrow)
|
||||
void gtk_paint_arrow (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
GtkArrowType arrow_type,
|
||||
gboolean fill,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_icon)
|
||||
void gtk_paint_diamond (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_frame)
|
||||
void gtk_paint_box (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_background)
|
||||
void gtk_paint_flat_box (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_check)
|
||||
void gtk_paint_check (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_option)
|
||||
void gtk_paint_option (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_background)
|
||||
void gtk_paint_tab (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
void gtk_paint_shadow_gap (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
GtkPositionType gap_side,
|
||||
gint gap_x,
|
||||
gint gap_width);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
void gtk_paint_box_gap (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
GtkPositionType gap_side,
|
||||
gint gap_x,
|
||||
gint gap_width);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_extension)
|
||||
void gtk_paint_extension (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
GtkPositionType gap_side);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_focus)
|
||||
void gtk_paint_focus (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_focus)
|
||||
void gtk_paint_slider (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
GtkOrientation orientation);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_handle)
|
||||
void gtk_paint_handle (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkShadowType shadow_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
GtkOrientation orientation);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_expander)
|
||||
void gtk_paint_expander (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
GtkExpanderStyle expander_style);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_layout)
|
||||
void gtk_paint_layout (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
gboolean use_text,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
gint x,
|
||||
gint y,
|
||||
PangoLayout *layout);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_handle)
|
||||
void gtk_paint_resize_grip (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
GdkWindowEdge edge,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_render_icon)
|
||||
void gtk_paint_spinner (GtkStyle *style,
|
||||
cairo_t *cr,
|
||||
GtkStateType state_type,
|
||||
GtkWidget *widget,
|
||||
const gchar *detail,
|
||||
guint step,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_style_context_get_property)
|
||||
void gtk_style_get_style_property (GtkStyle *style,
|
||||
GType widget_type,
|
||||
const gchar *property_name,
|
||||
GValue *value);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_style_context_get_property)
|
||||
void gtk_style_get_valist (GtkStyle *style,
|
||||
GType widget_type,
|
||||
const gchar *first_property_name,
|
||||
va_list var_args);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext and gtk_style_context_get_property)
|
||||
void gtk_style_get (GtkStyle *style,
|
||||
GType widget_type,
|
||||
const gchar *first_property_name,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
|
||||
|
||||
/* --- private API --- */
|
||||
GtkStyle* _gtk_style_new_for_path (GdkScreen *screen,
|
||||
GtkWidgetPath *path);
|
||||
void _gtk_style_shade (const GdkColor *a,
|
||||
GdkColor *b,
|
||||
gdouble k);
|
||||
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
gboolean gtk_style_has_context (GtkStyle *style);
|
||||
|
||||
GDK_DEPRECATED_IN_3_0
|
||||
void gtk_widget_style_attach (GtkWidget *widget);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
gboolean gtk_widget_has_rc_style (GtkWidget *widget);
|
||||
GDK_DEPRECATED_IN_3_0
|
||||
void gtk_widget_set_style (GtkWidget *widget,
|
||||
GtkStyle *style);
|
||||
GDK_DEPRECATED_IN_3_0
|
||||
void gtk_widget_ensure_style (GtkWidget *widget);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(gtk_widget_get_style_context)
|
||||
GtkStyle * gtk_widget_get_style (GtkWidget *widget);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
void gtk_widget_modify_style (GtkWidget *widget,
|
||||
GtkRcStyle *style);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
|
||||
GtkRcStyle *gtk_widget_get_modifier_style (GtkWidget *widget);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(gtk_widget_override_color)
|
||||
void gtk_widget_modify_fg (GtkWidget *widget,
|
||||
GtkStateType state,
|
||||
const GdkColor *color);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(gtk_widget_override_background_color)
|
||||
void gtk_widget_modify_bg (GtkWidget *widget,
|
||||
GtkStateType state,
|
||||
const GdkColor *color);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(CSS style classes)
|
||||
void gtk_widget_modify_text (GtkWidget *widget,
|
||||
GtkStateType state,
|
||||
const GdkColor *color);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(CSS style classes)
|
||||
void gtk_widget_modify_base (GtkWidget *widget,
|
||||
GtkStateType state,
|
||||
const GdkColor *color);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(CSS style classes)
|
||||
void gtk_widget_modify_cursor (GtkWidget *widget,
|
||||
const GdkColor *primary,
|
||||
const GdkColor *secondary);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(gtk_widget_override_font)
|
||||
void gtk_widget_modify_font (GtkWidget *widget,
|
||||
PangoFontDescription *font_desc);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(gtk_widget_reset_style)
|
||||
void gtk_widget_reset_rc_styles (GtkWidget *widget);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(gtk_style_context_new)
|
||||
GtkStyle* gtk_widget_get_default_style (void);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(gtk_widget_get_path)
|
||||
void gtk_widget_path (GtkWidget *widget,
|
||||
guint *path_length,
|
||||
gchar **path,
|
||||
gchar **path_reversed);
|
||||
GDK_DEPRECATED_IN_3_0
|
||||
void gtk_widget_class_path (GtkWidget *widget,
|
||||
guint *path_length,
|
||||
gchar **path,
|
||||
gchar **path_reversed);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(gtk_widget_render_icon_pixbuf)
|
||||
GdkPixbuf *gtk_widget_render_icon (GtkWidget *widget,
|
||||
const gchar *stock_id,
|
||||
GtkIconSize size,
|
||||
const gchar *detail);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_STYLE_H__ */
|
@ -133,7 +133,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRadioButton, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRadioMenuItem, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRadioToolButton, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRange, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRcStyle, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRecentChooser, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRecentChooserDialog, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRecentChooserMenu, g_object_unref)
|
||||
@ -159,7 +158,6 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkSpinner, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkStack, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkStackSwitcher, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkStatusbar, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkStyle, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkStyleContext, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkStyleProperties, g_object_unref)
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkStyleProvider, g_object_unref)
|
||||
|
@ -263,10 +263,8 @@
|
||||
#include <gtk/deprecated/gtkimagemenuitem.h>
|
||||
#include <gtk/deprecated/gtkmisc.h>
|
||||
#include <gtk/deprecated/gtkradioaction.h>
|
||||
#include <gtk/deprecated/gtkrc.h>
|
||||
#include <gtk/deprecated/gtkrecentaction.h>
|
||||
#include <gtk/deprecated/gtkstock.h>
|
||||
#include <gtk/deprecated/gtkstyle.h>
|
||||
#include <gtk/deprecated/gtkstyleproperties.h>
|
||||
#include <gtk/deprecated/gtksymboliccolor.h>
|
||||
#include <gtk/deprecated/gtktable.h>
|
||||
|
@ -50,13 +50,6 @@
|
||||
#include "gtkprivate.h"
|
||||
#include "gdkpixbufutilsprivate.h"
|
||||
|
||||
#undef GDK_DEPRECATED
|
||||
#undef GDK_DEPRECATED_FOR
|
||||
#define GDK_DEPRECATED
|
||||
#define GDK_DEPRECATED_FOR(f)
|
||||
|
||||
#include "deprecated/gtkstyle.h"
|
||||
|
||||
/* this is in case round() is not provided by the compiler,
|
||||
* such as in the case of C89 compilers, like MSVC
|
||||
*/
|
||||
@ -5111,90 +5104,6 @@ gtk_icon_info_load_symbolic_for_context_finish (GtkIconInfo *icon_info,
|
||||
return gtk_icon_info_load_symbolic_finish (icon_info, result, was_symbolic, error);
|
||||
}
|
||||
|
||||
static GdkRGBA *
|
||||
color_to_rgba (GdkColor *color,
|
||||
GdkRGBA *rgba)
|
||||
{
|
||||
rgba->red = color->red / 65535.0;
|
||||
rgba->green = color->green / 65535.0;
|
||||
rgba->blue = color->blue / 65535.0;
|
||||
rgba->alpha = 1.0;
|
||||
return rgba;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_icon_info_load_symbolic_for_style:
|
||||
* @icon_info: a #GtkIconInfo
|
||||
* @style: a #GtkStyle to take the colors from
|
||||
* @state: the widget state to use for colors
|
||||
* @was_symbolic: (out) (allow-none): a #gboolean, returns whether the
|
||||
* loaded icon was a symbolic one and whether the @fg color was
|
||||
* applied to it.
|
||||
* @error: (allow-none): location to store error information on failure,
|
||||
* or %NULL.
|
||||
*
|
||||
* Loads an icon, modifying it to match the system colours for the foreground,
|
||||
* success, warning and error colors provided. If the icon is not a symbolic
|
||||
* one, the function will return the result from gtk_icon_info_load_icon().
|
||||
*
|
||||
* This allows loading symbolic icons that will match the system theme.
|
||||
*
|
||||
* See gtk_icon_info_load_symbolic() for more details.
|
||||
*
|
||||
* Returns: (transfer full): a #GdkPixbuf representing the loaded icon
|
||||
*
|
||||
* Since: 3.0
|
||||
*
|
||||
* Deprecated: 3.0: Use gtk_icon_info_load_symbolic_for_context() instead
|
||||
*/
|
||||
GdkPixbuf *
|
||||
gtk_icon_info_load_symbolic_for_style (GtkIconInfo *icon_info,
|
||||
GtkStyle *style,
|
||||
GtkStateType state,
|
||||
gboolean *was_symbolic,
|
||||
GError **error)
|
||||
{
|
||||
GdkColor color;
|
||||
GdkRGBA fg;
|
||||
GdkRGBA success_color;
|
||||
GdkRGBA *success_colorp;
|
||||
GdkRGBA warning_color;
|
||||
GdkRGBA *warning_colorp;
|
||||
GdkRGBA error_color;
|
||||
GdkRGBA *error_colorp;
|
||||
gboolean is_symbolic;
|
||||
|
||||
g_return_val_if_fail (icon_info != NULL, NULL);
|
||||
g_return_val_if_fail (style != NULL, NULL);
|
||||
|
||||
is_symbolic = gtk_icon_info_is_symbolic (icon_info);
|
||||
|
||||
if (was_symbolic)
|
||||
*was_symbolic = is_symbolic;
|
||||
|
||||
if (!is_symbolic)
|
||||
return gtk_icon_info_load_icon (icon_info, error);
|
||||
|
||||
color_to_rgba (&style->fg[state], &fg);
|
||||
|
||||
success_colorp = warning_colorp = error_colorp = NULL;
|
||||
|
||||
if (gtk_style_lookup_color (style, "success_color", &color))
|
||||
success_colorp = color_to_rgba (&color, &success_color);
|
||||
|
||||
if (gtk_style_lookup_color (style, "warning_color", &color))
|
||||
warning_colorp = color_to_rgba (&color, &warning_color);
|
||||
|
||||
if (gtk_style_lookup_color (style, "error_color", &color))
|
||||
error_colorp = color_to_rgba (&color, &error_color);
|
||||
|
||||
return gtk_icon_info_load_symbolic_internal (icon_info,
|
||||
&fg, success_colorp,
|
||||
warning_colorp, error_colorp,
|
||||
TRUE,
|
||||
error);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_icon_info_set_raw_coordinates:
|
||||
* @icon_info: a #GtkIconInfo
|
||||
|
@ -351,12 +351,6 @@ GdkPixbuf * gtk_icon_info_load_symbolic_for_context_finish (GtkIconInf
|
||||
GAsyncResult *res,
|
||||
gboolean *was_symbolic,
|
||||
GError **error);
|
||||
GDK_DEPRECATED_IN_3_0_FOR(gtk_icon_info_load_symbol_for_context)
|
||||
GdkPixbuf * gtk_icon_info_load_symbolic_for_style (GtkIconInfo *icon_info,
|
||||
GtkStyle *style,
|
||||
GtkStateType state,
|
||||
gboolean *was_symbolic,
|
||||
GError **error);
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
void gtk_icon_info_set_raw_coordinates (GtkIconInfo *icon_info,
|
||||
gboolean raw_coordinates);
|
||||
|
@ -29,7 +29,6 @@
|
||||
#include "gtksizegroup-private.h"
|
||||
#include "gtksizerequestcacheprivate.h"
|
||||
#include "gtkwidgetprivate.h"
|
||||
#include "deprecated/gtkstyle.h"
|
||||
|
||||
|
||||
#ifdef G_ENABLE_CONSISTENCY_CHECKS
|
||||
@ -169,10 +168,6 @@ gtk_widget_query_size_for_orientation (GtkWidget *widget,
|
||||
{
|
||||
gint adjusted_min, adjusted_natural, adjusted_for_size = for_size;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||
gtk_widget_ensure_style (widget);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||
|
||||
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||
{
|
||||
if (for_size < 0)
|
||||
|
@ -36,11 +36,9 @@ typedef struct _GtkBuilder GtkBuilder;
|
||||
typedef struct _GtkClipboard GtkClipboard;
|
||||
typedef struct _GtkIconSet GtkIconSet;
|
||||
typedef struct _GtkIconSource GtkIconSource;
|
||||
typedef struct _GtkRcStyle GtkRcStyle;
|
||||
typedef struct _GtkRequisition GtkRequisition;
|
||||
typedef struct _GtkSelectionData GtkSelectionData;
|
||||
typedef struct _GtkSettings GtkSettings;
|
||||
typedef struct _GtkStyle GtkStyle;
|
||||
typedef struct _GtkStyleContext GtkStyleContext;
|
||||
typedef struct _GtkTooltip GtkTooltip;
|
||||
typedef struct _GtkWidget GtkWidget;
|
||||
|
119
gtk/gtkwidget.c
119
gtk/gtkwidget.c
@ -503,7 +503,6 @@ enum {
|
||||
STATE_CHANGED,
|
||||
PARENT_SET,
|
||||
HIERARCHY_CHANGED,
|
||||
STYLE_SET,
|
||||
DIRECTION_CHANGED,
|
||||
GRAB_NOTIFY,
|
||||
CHILD_NOTIFY,
|
||||
@ -580,7 +579,6 @@ enum {
|
||||
PROP_HAS_DEFAULT,
|
||||
PROP_RECEIVES_DEFAULT,
|
||||
PROP_COMPOSITE_CHILD,
|
||||
PROP_STYLE,
|
||||
PROP_EVENTS,
|
||||
PROP_NO_SHOW_ALL,
|
||||
PROP_HAS_TOOLTIP,
|
||||
@ -643,8 +641,6 @@ static void gtk_widget_real_realize (GtkWidget *widget);
|
||||
static void gtk_widget_real_unrealize (GtkWidget *widget);
|
||||
static void gtk_widget_real_size_allocate (GtkWidget *widget,
|
||||
GtkAllocation *allocation);
|
||||
static void gtk_widget_real_style_set (GtkWidget *widget,
|
||||
GtkStyle *previous_style);
|
||||
static void gtk_widget_real_direction_changed(GtkWidget *widget,
|
||||
GtkTextDirection previous_direction);
|
||||
|
||||
@ -1039,7 +1035,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
|
||||
klass->state_flags_changed = gtk_widget_real_state_flags_changed;
|
||||
klass->parent_set = NULL;
|
||||
klass->hierarchy_changed = NULL;
|
||||
klass->style_set = gtk_widget_real_style_set;
|
||||
klass->direction_changed = gtk_widget_real_direction_changed;
|
||||
klass->grab_notify = NULL;
|
||||
klass->child_notify = NULL;
|
||||
@ -1218,24 +1213,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
|
||||
FALSE,
|
||||
GTK_PARAM_READABLE);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
/**
|
||||
* GtkWidget:style:
|
||||
*
|
||||
* The style of the widget, which contains information about how it will look (colors, etc).
|
||||
*
|
||||
* Deprecated: Use #GtkStyleContext instead
|
||||
*/
|
||||
widget_props[PROP_STYLE] =
|
||||
g_param_spec_object ("style",
|
||||
P_("Style"),
|
||||
P_("The style of the widget, which contains information about how it will look (colors etc)"),
|
||||
GTK_TYPE_STYLE,
|
||||
GTK_PARAM_READWRITE|G_PARAM_DEPRECATED);
|
||||
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
widget_props[PROP_EVENTS] =
|
||||
g_param_spec_flags ("events",
|
||||
P_("Events"),
|
||||
@ -1849,37 +1826,6 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
G_TYPE_NONE, 1,
|
||||
GTK_TYPE_WIDGET);
|
||||
|
||||
/**
|
||||
* GtkWidget::style-set:
|
||||
* @widget: the object on which the signal is emitted
|
||||
* @previous_style: (allow-none): the previous style, or %NULL if the widget
|
||||
* just got its initial style
|
||||
*
|
||||
* The ::style-set signal is emitted when a new style has been set
|
||||
* on a widget. Note that style-modifying functions like
|
||||
* gtk_widget_modify_base() also cause this signal to be emitted.
|
||||
*
|
||||
* Note that this signal is emitted for changes to the deprecated
|
||||
* #GtkStyle. To track changes to the #GtkStyleContext associated
|
||||
* with a widget, use the #GtkWidget::style-updated signal.
|
||||
*
|
||||
* Deprecated:3.0: Use the #GtkWidget::style-updated signal
|
||||
*/
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
widget_signals[STYLE_SET] =
|
||||
g_signal_new (I_("style-set"),
|
||||
G_TYPE_FROM_CLASS (gobject_class),
|
||||
G_SIGNAL_RUN_FIRST | G_SIGNAL_DEPRECATED,
|
||||
G_STRUCT_OFFSET (GtkWidgetClass, style_set),
|
||||
NULL, NULL,
|
||||
NULL,
|
||||
G_TYPE_NONE, 1,
|
||||
GTK_TYPE_STYLE);
|
||||
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
/**
|
||||
* GtkWidget::style-updated:
|
||||
* @widget: the object on which the signal is emitted
|
||||
@ -3736,11 +3682,6 @@ gtk_widget_set_property (GObject *object,
|
||||
case PROP_RECEIVES_DEFAULT:
|
||||
gtk_widget_set_receives_default (widget, g_value_get_boolean (value));
|
||||
break;
|
||||
case PROP_STYLE:
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||
gtk_widget_set_style (widget, g_value_get_object (value));
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||
break;
|
||||
case PROP_EVENTS:
|
||||
if (!_gtk_widget_get_realized (widget) && _gtk_widget_get_has_window (widget))
|
||||
gtk_widget_set_events (widget, g_value_get_flags (value));
|
||||
@ -3931,11 +3872,6 @@ gtk_widget_get_property (GObject *object,
|
||||
case PROP_COMPOSITE_CHILD:
|
||||
g_value_set_boolean (value, widget->priv->composite_child);
|
||||
break;
|
||||
case PROP_STYLE:
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||
g_value_set_object (value, gtk_widget_get_style (widget));
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||
break;
|
||||
case PROP_EVENTS:
|
||||
eventp = g_object_get_qdata (G_OBJECT (widget), quark_event_mask);
|
||||
g_value_set_flags (value, GPOINTER_TO_INT (eventp));
|
||||
@ -4406,11 +4342,6 @@ gtk_widget_init (GTypeInstance *instance, gpointer g_class)
|
||||
/* need to set correct type here, and only class has the correct type here */
|
||||
gtk_css_node_set_widget_type (priv->cssnode, G_TYPE_FROM_CLASS (g_class));
|
||||
gtk_css_node_set_name (priv->cssnode, GTK_WIDGET_CLASS (g_class)->priv->css_name);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||
priv->style = gtk_widget_get_default_style ();
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||
g_object_ref (priv->style);
|
||||
}
|
||||
|
||||
|
||||
@ -5444,10 +5375,6 @@ gtk_widget_realize (GtkWidget *widget)
|
||||
if (priv->parent && !_gtk_widget_get_realized (priv->parent))
|
||||
gtk_widget_realize (priv->parent);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gtk_widget_ensure_style (widget);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
g_signal_emit (widget, widget_signals[REALIZE], 0);
|
||||
|
||||
gtk_widget_real_set_has_tooltip (widget, gtk_widget_get_has_tooltip (widget), TRUE);
|
||||
@ -8144,8 +8071,6 @@ gtk_widget_real_state_flags_changed (GtkWidget *widget,
|
||||
static void
|
||||
gtk_widget_real_style_updated (GtkWidget *widget)
|
||||
{
|
||||
GtkWidgetPrivate *priv = widget->priv;
|
||||
|
||||
gtk_widget_update_alpha (widget);
|
||||
|
||||
if (widget->priv->context)
|
||||
@ -8176,21 +8101,6 @@ gtk_widget_real_style_updated (GtkWidget *widget)
|
||||
if (widget->priv->anchored)
|
||||
gtk_widget_queue_resize (widget);
|
||||
}
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||
if (priv->style != NULL &&
|
||||
priv->style != gtk_widget_get_default_style ())
|
||||
{
|
||||
/* Trigger ::style-set for old
|
||||
* widgets not listening to this
|
||||
*/
|
||||
g_signal_emit (widget,
|
||||
widget_signals[STYLE_SET],
|
||||
0,
|
||||
widget->priv->style);
|
||||
}
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -9830,12 +9740,6 @@ gtk_widget_real_direction_changed (GtkWidget *widget,
|
||||
gtk_widget_queue_resize (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_widget_real_style_set (GtkWidget *widget,
|
||||
GtkStyle *previous_style)
|
||||
{
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
GtkWidget *previous_toplevel;
|
||||
GdkScreen *previous_screen;
|
||||
@ -12128,13 +12032,6 @@ gtk_widget_real_destroy (GtkWidget *object)
|
||||
gtk_grab_remove (widget);
|
||||
|
||||
destroy_tick_callbacks (widget);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
||||
if (priv->style)
|
||||
g_object_unref (priv->style);
|
||||
priv->style = gtk_widget_get_default_style ();
|
||||
g_object_ref (priv->style);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -12146,8 +12043,6 @@ gtk_widget_finalize (GObject *object)
|
||||
|
||||
gtk_grab_remove (widget);
|
||||
|
||||
g_clear_object (&priv->style);
|
||||
|
||||
g_free (priv->name);
|
||||
|
||||
g_clear_object (&priv->accessible);
|
||||
@ -16496,20 +16391,6 @@ gtk_widget_get_modifier_mask (GtkWidget *widget,
|
||||
intent);
|
||||
}
|
||||
|
||||
GtkStyle *
|
||||
_gtk_widget_get_style (GtkWidget *widget)
|
||||
{
|
||||
return widget->priv->style;
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_widget_set_style (GtkWidget *widget,
|
||||
GtkStyle *style)
|
||||
{
|
||||
g_signal_emit (widget, widget_signals[STYLE_SET], 0, widget->priv->style);
|
||||
widget->priv->style = style;
|
||||
}
|
||||
|
||||
GtkActionMuxer *
|
||||
_gtk_widget_get_parent_muxer (GtkWidget *widget,
|
||||
gboolean create)
|
||||
|
@ -391,8 +391,6 @@ struct _GtkWidgetClass
|
||||
GtkWidget *previous_parent);
|
||||
void (* hierarchy_changed) (GtkWidget *widget,
|
||||
GtkWidget *previous_toplevel);
|
||||
void (* style_set) (GtkWidget *widget,
|
||||
GtkStyle *previous_style);
|
||||
void (* direction_changed) (GtkWidget *widget,
|
||||
GtkTextDirection previous_direction);
|
||||
void (* grab_notify) (GtkWidget *widget,
|
||||
|
@ -132,7 +132,6 @@ struct _GtkWidgetPrivate
|
||||
* along with graphics contexts used to draw with and
|
||||
* the font to use for text.
|
||||
*/
|
||||
GtkStyle *style;
|
||||
GtkCssNode *cssnode;
|
||||
GtkStyleContext *context;
|
||||
|
||||
@ -248,9 +247,6 @@ void _gtk_widget_buildable_finish_accelerator (GtkWidget *widget,
|
||||
GtkWidget *toplevel,
|
||||
gpointer user_data);
|
||||
GtkStyleContext * _gtk_widget_peek_style_context (GtkWidget *widget);
|
||||
GtkStyle * _gtk_widget_get_style (GtkWidget *widget);
|
||||
void _gtk_widget_set_style (GtkWidget *widget,
|
||||
GtkStyle *style);
|
||||
gboolean _gtk_widget_supports_clip (GtkWidget *widget);
|
||||
void _gtk_widget_set_simple_clip (GtkWidget *widget,
|
||||
GtkAllocation *content_clip);
|
||||
|
Loading…
Reference in New Issue
Block a user