forked from AuroraMiddleware/gtk
Remove GtkThemingEngine
As well as the corresponding GtkCssEngineValue used to parse it in css.
This commit is contained in:
parent
9f930c08a6
commit
f2c455fedb
@ -5919,47 +5919,6 @@ gtk_css_provider_error_quark
|
||||
gtk_css_section_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkthemingengine</FILE>
|
||||
<TITLE>GtkThemingEngine</TITLE>
|
||||
GtkThemingEngineClass
|
||||
GtkThemingEngine
|
||||
gtk_theming_engine_get
|
||||
gtk_theming_engine_get_direction
|
||||
gtk_theming_engine_get_junction_sides
|
||||
gtk_theming_engine_get_path
|
||||
gtk_theming_engine_get_property
|
||||
gtk_theming_engine_get_screen
|
||||
gtk_theming_engine_get_state
|
||||
gtk_theming_engine_get_style
|
||||
gtk_theming_engine_get_style_property
|
||||
gtk_theming_engine_get_style_valist
|
||||
gtk_theming_engine_get_valist
|
||||
gtk_theming_engine_get_color
|
||||
gtk_theming_engine_get_background_color
|
||||
gtk_theming_engine_get_border_color
|
||||
gtk_theming_engine_get_border
|
||||
gtk_theming_engine_get_padding
|
||||
gtk_theming_engine_get_margin
|
||||
gtk_theming_engine_get_font
|
||||
gtk_theming_engine_has_class
|
||||
gtk_theming_engine_has_region
|
||||
gtk_theming_engine_lookup_color
|
||||
gtk_theming_engine_state_is_running
|
||||
gtk_theming_engine_load
|
||||
gtk_theming_engine_register_property
|
||||
<SUBSECTION Standard>
|
||||
GTK_THEMING_ENGINE
|
||||
GTK_THEMING_ENGINE_CLASS
|
||||
GTK_THEMING_ENGINE_GET_CLASS
|
||||
GTK_IS_THEMING_ENGINE
|
||||
GTK_IS_THEMING_ENGINE_CLASS
|
||||
<SUBSECTION Private>
|
||||
GtkThemingEnginePrivate
|
||||
GTK_TYPE_THEMING_ENGINE
|
||||
gtk_theming_engine_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtksymboliccolor</FILE>
|
||||
<TITLE>GtkSymbolicColor</TITLE>
|
||||
|
@ -407,7 +407,6 @@ gtk_private_h_sources = \
|
||||
gtkcsscustompropertyprivate.h \
|
||||
gtkcssdimensionvalueprivate.h \
|
||||
gtkcsseasevalueprivate.h \
|
||||
gtkcssenginevalueprivate.h \
|
||||
gtkcssenumvalueprivate.h \
|
||||
gtkcssgadgetprivate.h \
|
||||
gtkcssiconthemevalueprivate.h \
|
||||
@ -678,7 +677,6 @@ gtk_base_c_sources = \
|
||||
gtkcssdimensionvalue.c \
|
||||
gtkcsseasevalue.c \
|
||||
gtkcssenumvalue.c \
|
||||
gtkcssenginevalue.c \
|
||||
gtkcssgadget.c \
|
||||
gtkcssiconthemevalue.c \
|
||||
gtkcssimage.c \
|
||||
|
@ -10,7 +10,6 @@ deprecated_h_sources = \
|
||||
deprecated/gtkstyleproperties.h \
|
||||
deprecated/gtksymboliccolor.h \
|
||||
deprecated/gtktable.h \
|
||||
deprecated/gtkthemingengine.h \
|
||||
deprecated/gtktoggleaction.h \
|
||||
deprecated/gtkuimanager.h
|
||||
|
||||
@ -31,6 +30,5 @@ deprecated_c_sources = \
|
||||
deprecated/gtkstyleproperties.c \
|
||||
deprecated/gtksymboliccolor.c \
|
||||
deprecated/gtktable.c \
|
||||
deprecated/gtkthemingengine.c \
|
||||
deprecated/gtktoggleaction.c \
|
||||
deprecated/gtkuimanager.c
|
||||
|
@ -33,7 +33,6 @@
|
||||
#include "gtkstyleproviderprivate.h"
|
||||
#include "gtkintl.h"
|
||||
|
||||
#include "deprecated/gtkthemingengine.h"
|
||||
#include "deprecated/gtkgradient.h"
|
||||
#include "deprecated/gtksymboliccolorprivate.h"
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,292 +0,0 @@
|
||||
/* GTK - The GIMP Toolkit
|
||||
* Copyright (C) 2010 Carlos Garnacho <carlosg@gnome.org>
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#ifndef __GTK_THEMING_ENGINE_H__
|
||||
#define __GTK_THEMING_ENGINE_H__
|
||||
|
||||
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
||||
#error "Only <gtk/gtk.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <cairo.h>
|
||||
|
||||
#include <gtk/gtkborder.h>
|
||||
#include <gtk/gtkenums.h>
|
||||
#include <gtk/deprecated/gtkstyleproperties.h>
|
||||
#include <gtk/gtktypes.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GTK_TYPE_THEMING_ENGINE (gtk_theming_engine_get_type ())
|
||||
#define GTK_THEMING_ENGINE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_THEMING_ENGINE, GtkThemingEngine))
|
||||
#define GTK_THEMING_ENGINE_CLASS(c) (G_TYPE_CHECK_CLASS_CAST ((c), GTK_TYPE_THEMING_ENGINE, GtkThemingEngineClass))
|
||||
#define GTK_IS_THEMING_ENGINE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_THEMING_ENGINE))
|
||||
#define GTK_IS_THEMING_ENGINE_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GTK_TYPE_THEMING_ENGINE))
|
||||
#define GTK_THEMING_ENGINE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_THEMING_ENGINE, GtkThemingEngineClass))
|
||||
|
||||
typedef struct _GtkThemingEngine GtkThemingEngine;
|
||||
typedef struct GtkThemingEnginePrivate GtkThemingEnginePrivate;
|
||||
typedef struct _GtkThemingEngineClass GtkThemingEngineClass;
|
||||
|
||||
struct _GtkThemingEngine
|
||||
{
|
||||
GObject parent_object;
|
||||
GtkThemingEnginePrivate *priv;
|
||||
};
|
||||
|
||||
/**
|
||||
* GtkThemingEngineClass:
|
||||
* @parent_class: The parent class.
|
||||
* @render_line: Renders a line between two points.
|
||||
* @render_background: Renders the background area of a widget region.
|
||||
* @render_frame: Renders the frame around a widget area.
|
||||
* @render_frame_gap: Renders the frame around a widget area with a gap in it.
|
||||
* @render_extension: Renders a extension to a box, usually a notebook tab.
|
||||
* @render_check: Renders a checkmark, as in #GtkCheckButton.
|
||||
* @render_option: Renders an option, as in #GtkRadioButton.
|
||||
* @render_arrow: Renders an arrow pointing to a certain direction.
|
||||
* @render_expander: Renders an element what will expose/expand part of
|
||||
* the UI, as in #GtkExpander.
|
||||
* @render_focus: Renders the focus indicator.
|
||||
* @render_layout: Renders a #PangoLayout
|
||||
* @render_slider: Renders a slider control, as in #GtkScale.
|
||||
* @render_handle: Renders a handle to drag UI elements, as in #GtkPaned.
|
||||
* @render_activity: Renders an area displaying activity, such as in #GtkSpinner,
|
||||
* or #GtkProgressBar.
|
||||
* @render_icon_pixbuf: Renders an icon as a #GdkPixbuf.
|
||||
* @render_icon: Renders an icon given as a #GdkPixbuf.
|
||||
* @render_icon_surface: Renders an icon given as a #cairo_surface_t.
|
||||
*
|
||||
* Base class for theming engines.
|
||||
*/
|
||||
struct _GtkThemingEngineClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
|
||||
/*< public >*/
|
||||
|
||||
void (* render_line) (GtkThemingEngine *engine,
|
||||
cairo_t *cr,
|
||||
gdouble x0,
|
||||
gdouble y0,
|
||||
gdouble x1,
|
||||
gdouble y1);
|
||||
void (* render_background) (GtkThemingEngine *engine,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
void (* render_frame) (GtkThemingEngine *engine,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
void (* render_frame_gap) (GtkThemingEngine *engine,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height,
|
||||
GtkPositionType gap_side,
|
||||
gdouble xy0_gap,
|
||||
gdouble xy1_gap);
|
||||
void (* render_extension) (GtkThemingEngine *engine,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height,
|
||||
GtkPositionType gap_side);
|
||||
void (* render_check) (GtkThemingEngine *engine,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
void (* render_option) (GtkThemingEngine *engine,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
void (* render_arrow) (GtkThemingEngine *engine,
|
||||
cairo_t *cr,
|
||||
gdouble angle,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble size);
|
||||
void (* render_expander) (GtkThemingEngine *engine,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
void (* render_focus) (GtkThemingEngine *engine,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
void (* render_layout) (GtkThemingEngine *engine,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
PangoLayout *layout);
|
||||
void (* render_slider) (GtkThemingEngine *engine,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height,
|
||||
GtkOrientation orientation);
|
||||
void (* render_handle) (GtkThemingEngine *engine,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
void (* render_activity) (GtkThemingEngine *engine,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
|
||||
GdkPixbuf * (* render_icon_pixbuf) (GtkThemingEngine *engine,
|
||||
const GtkIconSource *source,
|
||||
GtkIconSize size);
|
||||
void (* render_icon) (GtkThemingEngine *engine,
|
||||
cairo_t *cr,
|
||||
GdkPixbuf *pixbuf,
|
||||
gdouble x,
|
||||
gdouble y);
|
||||
void (* render_icon_surface) (GtkThemingEngine *engine,
|
||||
cairo_t *cr,
|
||||
cairo_surface_t *surface,
|
||||
gdouble x,
|
||||
gdouble y);
|
||||
|
||||
/*< private >*/
|
||||
gpointer padding[14];
|
||||
};
|
||||
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
GType gtk_theming_engine_get_type (void) G_GNUC_CONST;
|
||||
|
||||
/* function implemented in gtkcsscustomproperty.c */
|
||||
GDK_DEPRECATED_IN_3_8
|
||||
void gtk_theming_engine_register_property (const gchar *name_space,
|
||||
GtkStylePropertyParser parse_func,
|
||||
GParamSpec *pspec);
|
||||
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
void gtk_theming_engine_get_property (GtkThemingEngine *engine,
|
||||
const gchar *property,
|
||||
GtkStateFlags state,
|
||||
GValue *value);
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
void gtk_theming_engine_get_valist (GtkThemingEngine *engine,
|
||||
GtkStateFlags state,
|
||||
va_list args);
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
void gtk_theming_engine_get (GtkThemingEngine *engine,
|
||||
GtkStateFlags state,
|
||||
...) G_GNUC_NULL_TERMINATED;
|
||||
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
void gtk_theming_engine_get_style_property (GtkThemingEngine *engine,
|
||||
const gchar *property_name,
|
||||
GValue *value);
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
void gtk_theming_engine_get_style_valist (GtkThemingEngine *engine,
|
||||
va_list args);
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
void gtk_theming_engine_get_style (GtkThemingEngine *engine,
|
||||
...);
|
||||
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
gboolean gtk_theming_engine_lookup_color (GtkThemingEngine *engine,
|
||||
const gchar *color_name,
|
||||
GdkRGBA *color);
|
||||
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
const GtkWidgetPath * gtk_theming_engine_get_path (GtkThemingEngine *engine);
|
||||
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
gboolean gtk_theming_engine_has_class (GtkThemingEngine *engine,
|
||||
const gchar *style_class);
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
gboolean gtk_theming_engine_has_region (GtkThemingEngine *engine,
|
||||
const gchar *style_region,
|
||||
GtkRegionFlags *flags);
|
||||
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
GtkStateFlags gtk_theming_engine_get_state (GtkThemingEngine *engine);
|
||||
GDK_DEPRECATED_IN_3_6
|
||||
gboolean gtk_theming_engine_state_is_running (GtkThemingEngine *engine,
|
||||
GtkStateType state,
|
||||
gdouble *progress);
|
||||
|
||||
GDK_DEPRECATED_IN_3_8_FOR(gtk_theming_engine_get_state)
|
||||
GtkTextDirection gtk_theming_engine_get_direction (GtkThemingEngine *engine);
|
||||
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
GtkJunctionSides gtk_theming_engine_get_junction_sides (GtkThemingEngine *engine);
|
||||
|
||||
/* Helper functions */
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
void gtk_theming_engine_get_color (GtkThemingEngine *engine,
|
||||
GtkStateFlags state,
|
||||
GdkRGBA *color);
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
void gtk_theming_engine_get_background_color (GtkThemingEngine *engine,
|
||||
GtkStateFlags state,
|
||||
GdkRGBA *color);
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
void gtk_theming_engine_get_border_color (GtkThemingEngine *engine,
|
||||
GtkStateFlags state,
|
||||
GdkRGBA *color);
|
||||
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
void gtk_theming_engine_get_border (GtkThemingEngine *engine,
|
||||
GtkStateFlags state,
|
||||
GtkBorder *border);
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
void gtk_theming_engine_get_padding (GtkThemingEngine *engine,
|
||||
GtkStateFlags state,
|
||||
GtkBorder *padding);
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
void gtk_theming_engine_get_margin (GtkThemingEngine *engine,
|
||||
GtkStateFlags state,
|
||||
GtkBorder *margin);
|
||||
|
||||
GDK_DEPRECATED_IN_3_8_FOR(gtk_theming_engine_get)
|
||||
const PangoFontDescription * gtk_theming_engine_get_font (GtkThemingEngine *engine,
|
||||
GtkStateFlags state);
|
||||
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
GtkThemingEngine * gtk_theming_engine_load (const gchar *name);
|
||||
|
||||
GDK_DEPRECATED_IN_3_14
|
||||
GdkScreen * gtk_theming_engine_get_screen (GtkThemingEngine *engine);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_THEMING_ENGINE_H__ */
|
@ -255,7 +255,6 @@
|
||||
#include <gtk/deprecated/gtkstyleproperties.h>
|
||||
#include <gtk/deprecated/gtksymboliccolor.h>
|
||||
#include <gtk/deprecated/gtktable.h>
|
||||
#include <gtk/deprecated/gtkthemingengine.h>
|
||||
#include <gtk/deprecated/gtktoggleaction.h>
|
||||
#include <gtk/deprecated/gtkuimanager.h>
|
||||
#endif /* GTK_DISABLE_DEPRECATED */
|
||||
|
@ -285,7 +285,6 @@ gtk_css_value_array_transition (GtkCssValue *start,
|
||||
case GTK_CSS_PROPERTY_BORDER_IMAGE_REPEAT:
|
||||
case GTK_CSS_PROPERTY_BORDER_IMAGE_SLICE:
|
||||
case GTK_CSS_PROPERTY_BORDER_IMAGE_WIDTH:
|
||||
case GTK_CSS_PROPERTY_ENGINE:
|
||||
default:
|
||||
/* keep all values that are not arrays here, so we get a warning if we ever turn them
|
||||
* into arrays and start animating them. */
|
||||
|
@ -27,8 +27,6 @@
|
||||
#include "gtkcsstypedvalueprivate.h"
|
||||
#include "deprecated/gtkstylepropertiesprivate.h"
|
||||
|
||||
#include "deprecated/gtkthemingengine.h"
|
||||
|
||||
#include "deprecated/gtksymboliccolor.h"
|
||||
|
||||
G_DEFINE_TYPE (GtkCssCustomProperty, _gtk_css_custom_property, GTK_TYPE_CSS_STYLE_PROPERTY)
|
||||
@ -100,9 +98,7 @@ gtk_css_custom_property_create_initial_value (GParamSpec *pspec)
|
||||
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
if (pspec->value_type == GTK_TYPE_THEMING_ENGINE)
|
||||
g_value_set_object (&value, gtk_theming_engine_load (NULL));
|
||||
else if (pspec->value_type == PANGO_TYPE_FONT_DESCRIPTION)
|
||||
if (pspec->value_type == PANGO_TYPE_FONT_DESCRIPTION)
|
||||
g_value_take_boxed (&value, pango_font_description_from_string ("Sans 10"));
|
||||
else if (pspec->value_type == GDK_TYPE_RGBA)
|
||||
{
|
||||
|
@ -1,140 +0,0 @@
|
||||
/* GTK - The GIMP Toolkit
|
||||
* Copyright (C) 2011 Red Hat, Inc.
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#define GDK_DISABLE_DEPRECATION_WARNINGS
|
||||
#include "gtkcssenginevalueprivate.h"
|
||||
|
||||
#include "gtkstylepropertyprivate.h"
|
||||
|
||||
struct _GtkCssValue {
|
||||
GTK_CSS_VALUE_BASE
|
||||
GtkThemingEngine *engine;
|
||||
};
|
||||
|
||||
static void
|
||||
gtk_css_value_engine_free (GtkCssValue *value)
|
||||
{
|
||||
g_object_unref (value->engine);
|
||||
|
||||
g_slice_free (GtkCssValue, value);
|
||||
}
|
||||
|
||||
static GtkCssValue *
|
||||
gtk_css_value_engine_compute (GtkCssValue *value,
|
||||
guint property_id,
|
||||
GtkStyleProviderPrivate *provider,
|
||||
GtkCssStyle *style,
|
||||
GtkCssStyle *parent_style)
|
||||
{
|
||||
return _gtk_css_value_ref (value);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gtk_css_value_engine_equal (const GtkCssValue *value1,
|
||||
const GtkCssValue *value2)
|
||||
{
|
||||
return value1->engine == value2->engine;
|
||||
}
|
||||
|
||||
static GtkCssValue *
|
||||
gtk_css_value_engine_transition (GtkCssValue *start,
|
||||
GtkCssValue *end,
|
||||
guint property_id,
|
||||
double progress)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_css_value_engine_print (const GtkCssValue *value,
|
||||
GString *string)
|
||||
{
|
||||
char *name;
|
||||
|
||||
g_object_get (value->engine, "name", &name, NULL);
|
||||
|
||||
if (name)
|
||||
g_string_append (string, name);
|
||||
else
|
||||
g_string_append (string, "none");
|
||||
|
||||
g_free (name);
|
||||
}
|
||||
|
||||
static const GtkCssValueClass GTK_CSS_VALUE_ENGINE = {
|
||||
gtk_css_value_engine_free,
|
||||
gtk_css_value_engine_compute,
|
||||
gtk_css_value_engine_equal,
|
||||
gtk_css_value_engine_transition,
|
||||
gtk_css_value_engine_print
|
||||
};
|
||||
|
||||
GtkCssValue *
|
||||
_gtk_css_engine_value_new (GtkThemingEngine *engine)
|
||||
{
|
||||
GtkCssValue *result;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_THEMING_ENGINE (engine), NULL);
|
||||
|
||||
result = _gtk_css_value_new (GtkCssValue, >K_CSS_VALUE_ENGINE);
|
||||
result->engine = g_object_ref (engine);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
GtkCssValue *
|
||||
_gtk_css_engine_value_parse (GtkCssParser *parser)
|
||||
{
|
||||
GtkThemingEngine *engine;
|
||||
char *str;
|
||||
|
||||
g_return_val_if_fail (parser != NULL, NULL);
|
||||
|
||||
if (_gtk_css_parser_try (parser, "none", TRUE))
|
||||
return _gtk_css_engine_value_new (gtk_theming_engine_load (NULL));
|
||||
|
||||
str = _gtk_css_parser_try_ident (parser, TRUE);
|
||||
if (str == NULL)
|
||||
{
|
||||
_gtk_css_parser_error (parser, "Expected a valid theme name");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
engine = gtk_theming_engine_load (str);
|
||||
|
||||
if (engine == NULL)
|
||||
{
|
||||
_gtk_css_parser_error (parser, "Theming engine '%s' not found", str);
|
||||
g_free (str);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
g_free (str);
|
||||
|
||||
return _gtk_css_engine_value_new (engine);
|
||||
}
|
||||
|
||||
GtkThemingEngine *
|
||||
_gtk_css_engine_value_get_engine (const GtkCssValue *value)
|
||||
{
|
||||
g_return_val_if_fail (value->class == >K_CSS_VALUE_ENGINE, NULL);
|
||||
|
||||
return value->engine;
|
||||
}
|
||||
|
@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Copyright © 2012 Red Hat Inc.
|
||||
*
|
||||
* 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.1 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/>.
|
||||
*
|
||||
* Authors: Alexander Larsson <alexl@gnome.org>
|
||||
*/
|
||||
|
||||
#ifndef __GTK_CSS_ENGINE_VALUE_PRIVATE_H__
|
||||
#define __GTK_CSS_ENGINE_VALUE_PRIVATE_H__
|
||||
|
||||
#include "gtkcssparserprivate.h"
|
||||
#include "gtkcssvalueprivate.h"
|
||||
#include "deprecated/gtkthemingengine.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
GtkCssValue * _gtk_css_engine_value_new (GtkThemingEngine *engine);
|
||||
GtkCssValue * _gtk_css_engine_value_parse (GtkCssParser *parser);
|
||||
|
||||
GtkThemingEngine * _gtk_css_engine_value_get_engine (const GtkCssValue *engine);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_CSS_ENGINE_VALUE_PRIVATE_H__ */
|
@ -38,7 +38,6 @@
|
||||
#include "gtktypebuiltins.h"
|
||||
#include "gtkcsswin32sizevalueprivate.h"
|
||||
|
||||
#include "deprecated/gtkthemingengine.h"
|
||||
#include "deprecated/gtkgradientprivate.h"
|
||||
#include "deprecated/gtksymboliccolorprivate.h"
|
||||
|
||||
@ -551,63 +550,6 @@ string_value_print (const GValue *value,
|
||||
string_append_string (str, g_value_get_string (value));
|
||||
}
|
||||
|
||||
static gboolean
|
||||
theming_engine_value_parse (GtkCssParser *parser,
|
||||
GValue *value)
|
||||
{
|
||||
GtkThemingEngine *engine;
|
||||
char *str;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
if (_gtk_css_parser_try (parser, "none", TRUE))
|
||||
{
|
||||
g_value_set_object (value, gtk_theming_engine_load (NULL));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
str = _gtk_css_parser_try_ident (parser, TRUE);
|
||||
if (str == NULL)
|
||||
{
|
||||
_gtk_css_parser_error (parser, "Expected a valid theme name");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
engine = gtk_theming_engine_load (str);
|
||||
|
||||
if (engine == NULL)
|
||||
{
|
||||
_gtk_css_parser_error (parser, "Theming engine '%s' not found", str);
|
||||
g_free (str);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
g_value_set_object (value, engine);
|
||||
g_free (str);
|
||||
return TRUE;
|
||||
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
}
|
||||
|
||||
static void
|
||||
theming_engine_value_print (const GValue *value,
|
||||
GString *string)
|
||||
{
|
||||
GtkThemingEngine *engine;
|
||||
char *name;
|
||||
|
||||
engine = g_value_get_object (value);
|
||||
if (engine == NULL)
|
||||
g_string_append (string, "none");
|
||||
else
|
||||
{
|
||||
/* XXX: gtk_theming_engine_get_name()? */
|
||||
g_object_get (engine, "name", &name, NULL);
|
||||
g_string_append (string, name ? name : "none");
|
||||
g_free (name);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
border_value_parse (GtkCssParser *parser,
|
||||
GValue *value)
|
||||
@ -1021,16 +963,6 @@ gtk_css_style_funcs_init (void)
|
||||
string_value_parse,
|
||||
string_value_print,
|
||||
NULL);
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
register_conversion_function (GTK_TYPE_THEMING_ENGINE,
|
||||
theming_engine_value_parse,
|
||||
theming_engine_value_print,
|
||||
NULL);
|
||||
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
register_conversion_function (GTK_TYPE_BORDER,
|
||||
border_value_parse,
|
||||
border_value_print,
|
||||
|
@ -44,7 +44,6 @@
|
||||
#include "gtkcsscolorvalueprivate.h"
|
||||
#include "gtkcsscornervalueprivate.h"
|
||||
#include "gtkcsseasevalueprivate.h"
|
||||
#include "gtkcssenginevalueprivate.h"
|
||||
#include "gtkcssiconthemevalueprivate.h"
|
||||
#include "gtkcssimageprivate.h"
|
||||
#include "gtkcssimagebuiltinprivate.h"
|
||||
@ -62,8 +61,6 @@
|
||||
#include "gtkcsstransformvalueprivate.h"
|
||||
#include "gtktypebuiltins.h"
|
||||
|
||||
#include "deprecated/gtkthemingengine.h"
|
||||
|
||||
/*** REGISTRATION ***/
|
||||
|
||||
typedef enum {
|
||||
@ -931,31 +928,6 @@ iteration_count_parse (GtkCssStyleProperty *property,
|
||||
return _gtk_css_array_value_parse (parser, iteration_count_parse_one);
|
||||
}
|
||||
|
||||
static GtkCssValue *
|
||||
engine_parse (GtkCssStyleProperty *property,
|
||||
GtkCssParser *parser)
|
||||
{
|
||||
return _gtk_css_engine_value_parse (parser);
|
||||
}
|
||||
|
||||
static void
|
||||
engine_query (GtkCssStyleProperty *property,
|
||||
const GtkCssValue *css_value,
|
||||
GValue *value)
|
||||
{
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
g_value_init (value, GTK_TYPE_THEMING_ENGINE);
|
||||
g_value_set_object (value, _gtk_css_engine_value_get_engine (css_value));
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
}
|
||||
|
||||
static GtkCssValue *
|
||||
engine_assign (GtkCssStyleProperty *property,
|
||||
const GValue *value)
|
||||
{
|
||||
return _gtk_css_engine_value_new (g_value_get_object (value));
|
||||
}
|
||||
|
||||
static GtkCssValue *
|
||||
parse_margin (GtkCssStyleProperty *property,
|
||||
GtkCssParser *parser)
|
||||
@ -1827,18 +1799,6 @@ _gtk_css_style_property_init_properties (void)
|
||||
_gtk_css_icon_effect_value_new (GTK_CSS_ICON_EFFECT_NONE));
|
||||
_gtk_style_property_add_alias ("-gtk-icon-effect", "-gtk-image-effect");
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
gtk_css_style_property_register ("engine",
|
||||
GTK_CSS_PROPERTY_ENGINE,
|
||||
GTK_TYPE_THEMING_ENGINE,
|
||||
0,
|
||||
0,
|
||||
engine_parse,
|
||||
engine_query,
|
||||
engine_assign,
|
||||
_gtk_css_engine_value_new (gtk_theming_engine_load (NULL)));
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
/* Private property holding the binding sets */
|
||||
gtk_css_style_property_register ("-gtk-key-bindings",
|
||||
GTK_CSS_PROPERTY_GTK_KEY_BINDINGS,
|
||||
|
@ -223,7 +223,6 @@ enum { /*< skip >*/
|
||||
GTK_CSS_PROPERTY_ANIMATION_FILL_MODE,
|
||||
GTK_CSS_PROPERTY_OPACITY,
|
||||
GTK_CSS_PROPERTY_ICON_EFFECT,
|
||||
GTK_CSS_PROPERTY_ENGINE,
|
||||
GTK_CSS_PROPERTY_GTK_KEY_BINDINGS,
|
||||
GTK_CSS_PROPERTY_CARET_COLOR,
|
||||
GTK_CSS_PROPERTY_SECONDARY_CARET_COLOR,
|
||||
|
@ -1091,18 +1091,6 @@ GDK_AVAILABLE_IN_ALL
|
||||
void gtk_style_context_get_style (GtkStyleContext *context,
|
||||
...);
|
||||
|
||||
GDK_DEPRECATED_IN_3_10
|
||||
GdkPixbuf * gtk_icon_set_render_icon_pixbuf (GtkIconSet *icon_set,
|
||||
GtkStyleContext *context,
|
||||
GtkIconSize size);
|
||||
GDK_DEPRECATED_IN_3_10
|
||||
cairo_surface_t *
|
||||
gtk_icon_set_render_icon_surface (GtkIconSet *icon_set,
|
||||
GtkStyleContext *context,
|
||||
GtkIconSize size,
|
||||
int scale,
|
||||
GdkWindow *for_window);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_style_context_set_screen (GtkStyleContext *context,
|
||||
GdkScreen *screen);
|
||||
|
@ -1,5 +1,4 @@
|
||||
* {
|
||||
engine: none;
|
||||
gtk-key-bindings: none;
|
||||
icon-shadow: none;
|
||||
}
|
||||
|
@ -1,3 +1,2 @@
|
||||
deprecated.css:2: error: GTK_CSS_PROVIDER_ERROR_DEPRECATED
|
||||
deprecated.css:3: error: GTK_CSS_PROVIDER_ERROR_DEPRECATED
|
||||
deprecated.css:4: error: GTK_CSS_PROVIDER_ERROR_DEPRECATED
|
||||
|
@ -1,5 +1,4 @@
|
||||
* {
|
||||
-gtk-icon-shadow: none;
|
||||
-gtk-key-bindings: none;
|
||||
engine: none;
|
||||
}
|
||||
|
@ -27,7 +27,6 @@
|
||||
border-top-width: inherit;
|
||||
box-shadow: inherit;
|
||||
color: inherit;
|
||||
engine: inherit;
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
font-stretch: inherit;
|
||||
|
@ -1 +0,0 @@
|
||||
value-inherit.css:30: error: GTK_CSS_PROVIDER_ERROR_DEPRECATED
|
@ -27,7 +27,6 @@
|
||||
border-top-width: initial;
|
||||
box-shadow: initial;
|
||||
color: initial;
|
||||
engine: initial;
|
||||
font-family: initial;
|
||||
font-size: initial;
|
||||
font-style: initial;
|
||||
|
@ -1 +0,0 @@
|
||||
value-initial.css:30: error: GTK_CSS_PROVIDER_ERROR_DEPRECATED
|
@ -27,7 +27,6 @@
|
||||
border-top-width: none;
|
||||
box-shadow: none;
|
||||
color: none;
|
||||
engine: none;
|
||||
font-family: none;
|
||||
font-size: none;
|
||||
font-style: none;
|
||||
|
@ -18,7 +18,7 @@ value-none.css:24: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
|
||||
value-none.css:25: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
|
||||
value-none.css:27: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
|
||||
value-none.css:29: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
|
||||
value-none.css:30: error: GTK_CSS_PROVIDER_ERROR_DEPRECATED
|
||||
value-none.css:31: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
|
||||
value-none.css:32: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
|
||||
value-none.css:33: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
|
||||
value-none.css:34: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
|
||||
@ -30,4 +30,3 @@ value-none.css:39: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
|
||||
value-none.css:40: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
|
||||
value-none.css:41: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
|
||||
value-none.css:42: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
|
||||
value-none.css:43: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
|
||||
|
@ -7,7 +7,6 @@
|
||||
border-right-style: none;
|
||||
border-top-style: none;
|
||||
box-shadow: none;
|
||||
engine: none;
|
||||
font-family: "none";
|
||||
text-shadow: none;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user