2010-03-13 10:23:23 +00:00
|
|
|
|
/* 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
|
2012-02-27 13:01:10 +00:00
|
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
2010-03-13 10:23:23 +00:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
2010-07-19 09:54:31 +00:00
|
|
|
|
#include <math.h>
|
2010-03-13 10:23:23 +00:00
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
|
|
#include <gtk/gtkstylecontext.h>
|
|
|
|
|
#include <gtk/gtkintl.h>
|
|
|
|
|
|
2010-10-25 22:43:20 +00:00
|
|
|
|
#include "gtkprivate.h"
|
2011-10-22 06:48:13 +00:00
|
|
|
|
#include "gtkmodulesprivate.h"
|
2010-08-20 12:58:54 +00:00
|
|
|
|
#include "gtkpango.h"
|
2014-06-16 02:18:51 +00:00
|
|
|
|
#include "gtkrenderprivate.h"
|
2014-06-16 02:22:50 +00:00
|
|
|
|
#include "gtkstylecontextprivate.h"
|
2012-02-21 04:43:57 +00:00
|
|
|
|
|
2014-06-15 14:05:16 +00:00
|
|
|
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|
|
|
|
|
2010-10-19 08:59:46 +00:00
|
|
|
|
/**
|
|
|
|
|
* SECTION:gtkthemingengine
|
|
|
|
|
* @Short_description: Theming renderers
|
|
|
|
|
* @Title: GtkThemingEngine
|
|
|
|
|
* @See_also: #GtkStyleContext
|
|
|
|
|
*
|
2014-06-15 14:05:16 +00:00
|
|
|
|
* #GtkThemingEngine was the object used for rendering themed content
|
|
|
|
|
* in GTK+ widgets. It used to allow overriding GTK+'s default
|
|
|
|
|
* implementation of rendering functions by allowing engines to be
|
|
|
|
|
* loaded as modules.
|
2010-10-29 18:17:03 +00:00
|
|
|
|
*
|
2014-06-15 14:05:16 +00:00
|
|
|
|
* #GtkThemingEngine has been deprecated in GTK+ 3.14 and will be
|
|
|
|
|
* ignored for rendering. The advancements in CSS theming are good
|
|
|
|
|
* enough to allow themers to achieve their goals without the need
|
|
|
|
|
* to modify source code.
|
2010-10-19 08:59:46 +00:00
|
|
|
|
*/
|
|
|
|
|
|
2010-10-25 22:43:20 +00:00
|
|
|
|
enum {
|
|
|
|
|
PROP_0,
|
|
|
|
|
PROP_NAME
|
|
|
|
|
};
|
|
|
|
|
|
2010-03-13 10:23:23 +00:00
|
|
|
|
struct GtkThemingEnginePrivate
|
|
|
|
|
{
|
|
|
|
|
GtkStyleContext *context;
|
2010-10-25 22:43:20 +00:00
|
|
|
|
gchar *name;
|
2010-03-13 10:23:23 +00:00
|
|
|
|
};
|
|
|
|
|
|
2010-10-25 22:43:20 +00:00
|
|
|
|
static void gtk_theming_engine_finalize (GObject *object);
|
|
|
|
|
static void gtk_theming_engine_impl_set_property (GObject *object,
|
|
|
|
|
guint prop_id,
|
|
|
|
|
const GValue *value,
|
|
|
|
|
GParamSpec *pspec);
|
|
|
|
|
static void gtk_theming_engine_impl_get_property (GObject *object,
|
|
|
|
|
guint prop_id,
|
|
|
|
|
GValue *value,
|
|
|
|
|
GParamSpec *pspec);
|
|
|
|
|
|
2010-03-20 13:17:40 +00:00
|
|
|
|
static void gtk_theming_engine_render_check (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
|
|
|
|
gdouble height);
|
2010-03-20 16:37:34 +00:00
|
|
|
|
static void gtk_theming_engine_render_option (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
|
|
|
|
gdouble height);
|
2010-03-27 17:50:39 +00:00
|
|
|
|
static void gtk_theming_engine_render_arrow (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble angle,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble size);
|
2010-03-27 19:06:44 +00:00
|
|
|
|
static void gtk_theming_engine_render_background (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
|
|
|
|
gdouble height);
|
2010-03-27 19:11:31 +00:00
|
|
|
|
static void gtk_theming_engine_render_frame (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
|
|
|
|
gdouble height);
|
2010-03-27 19:15:45 +00:00
|
|
|
|
static void gtk_theming_engine_render_expander (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
|
|
|
|
gdouble height);
|
2010-03-27 19:18:38 +00:00
|
|
|
|
static void gtk_theming_engine_render_focus (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
|
|
|
|
gdouble height);
|
2010-03-27 19:21:55 +00:00
|
|
|
|
static void gtk_theming_engine_render_layout (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
PangoLayout *layout);
|
2010-03-27 20:17:22 +00:00
|
|
|
|
static void gtk_theming_engine_render_line (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x0,
|
|
|
|
|
gdouble y0,
|
|
|
|
|
gdouble x1,
|
|
|
|
|
gdouble y1);
|
2010-03-27 20:20:21 +00:00
|
|
|
|
static void gtk_theming_engine_render_slider (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
|
|
|
|
gdouble height,
|
|
|
|
|
GtkOrientation orientation);
|
2010-03-27 20:23:13 +00:00
|
|
|
|
static void gtk_theming_engine_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);
|
2010-03-27 20:25:33 +00:00
|
|
|
|
static void gtk_theming_engine_render_extension (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
|
|
|
|
gdouble height,
|
|
|
|
|
GtkPositionType gap_side);
|
2010-03-27 20:27:52 +00:00
|
|
|
|
static void gtk_theming_engine_render_handle (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
2010-10-12 22:52:50 +00:00
|
|
|
|
gdouble height);
|
2010-11-01 01:46:35 +00:00
|
|
|
|
static void gtk_theming_engine_render_activity (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
|
|
|
|
gdouble height);
|
2010-11-03 20:14:08 +00:00
|
|
|
|
static GdkPixbuf * gtk_theming_engine_render_icon_pixbuf (GtkThemingEngine *engine,
|
|
|
|
|
const GtkIconSource *source,
|
|
|
|
|
GtkIconSize size);
|
2011-06-06 14:23:06 +00:00
|
|
|
|
static void gtk_theming_engine_render_icon (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
GdkPixbuf *pixbuf,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y);
|
2013-06-24 10:35:39 +00:00
|
|
|
|
static void gtk_theming_engine_render_icon_surface (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
cairo_surface_t *surface,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y);
|
2010-03-20 13:17:40 +00:00
|
|
|
|
|
2013-06-27 19:02:52 +00:00
|
|
|
|
G_DEFINE_TYPE_WITH_PRIVATE (GtkThemingEngine, gtk_theming_engine, G_TYPE_OBJECT)
|
2010-03-13 17:35:35 +00:00
|
|
|
|
|
|
|
|
|
typedef struct GtkThemingModule GtkThemingModule;
|
|
|
|
|
typedef struct GtkThemingModuleClass GtkThemingModuleClass;
|
|
|
|
|
|
|
|
|
|
struct GtkThemingModule
|
|
|
|
|
{
|
|
|
|
|
GTypeModule parent_instance;
|
2010-10-20 11:26:27 +00:00
|
|
|
|
GModule *module;
|
2010-03-13 17:35:35 +00:00
|
|
|
|
gchar *name;
|
|
|
|
|
|
2010-10-20 11:26:27 +00:00
|
|
|
|
void (*init) (GTypeModule *module);
|
|
|
|
|
void (*exit) (void);
|
2010-03-13 17:35:35 +00:00
|
|
|
|
GtkThemingEngine * (*create_engine) (void);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct GtkThemingModuleClass
|
|
|
|
|
{
|
|
|
|
|
GTypeModuleClass parent_class;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#define GTK_TYPE_THEMING_MODULE (gtk_theming_module_get_type ())
|
|
|
|
|
#define GTK_THEMING_MODULE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_THEMING_MODULE, GtkThemingModule))
|
|
|
|
|
#define GTK_IS_THEMING_MODULE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_THEMING_MODULE))
|
|
|
|
|
|
2013-05-05 14:28:54 +00:00
|
|
|
|
_GDK_EXTERN
|
2012-10-02 17:19:50 +00:00
|
|
|
|
GType gtk_theming_module_get_type (void);
|
|
|
|
|
|
2010-03-13 17:35:35 +00:00
|
|
|
|
G_DEFINE_TYPE (GtkThemingModule, gtk_theming_module, G_TYPE_TYPE_MODULE);
|
|
|
|
|
|
2010-03-13 10:23:23 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_class_init (GtkThemingEngineClass *klass)
|
|
|
|
|
{
|
|
|
|
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
|
|
|
|
|
2010-10-25 22:43:20 +00:00
|
|
|
|
object_class->finalize = gtk_theming_engine_finalize;
|
|
|
|
|
object_class->set_property = gtk_theming_engine_impl_set_property;
|
|
|
|
|
object_class->get_property = gtk_theming_engine_impl_get_property;
|
|
|
|
|
|
2011-06-06 14:23:06 +00:00
|
|
|
|
klass->render_icon = gtk_theming_engine_render_icon;
|
2010-03-20 13:17:40 +00:00
|
|
|
|
klass->render_check = gtk_theming_engine_render_check;
|
2010-03-20 16:37:34 +00:00
|
|
|
|
klass->render_option = gtk_theming_engine_render_option;
|
2010-03-27 17:50:39 +00:00
|
|
|
|
klass->render_arrow = gtk_theming_engine_render_arrow;
|
2010-03-27 19:06:44 +00:00
|
|
|
|
klass->render_background = gtk_theming_engine_render_background;
|
2010-03-27 19:11:31 +00:00
|
|
|
|
klass->render_frame = gtk_theming_engine_render_frame;
|
2010-03-27 19:15:45 +00:00
|
|
|
|
klass->render_expander = gtk_theming_engine_render_expander;
|
2010-03-27 19:18:38 +00:00
|
|
|
|
klass->render_focus = gtk_theming_engine_render_focus;
|
2010-03-27 19:21:55 +00:00
|
|
|
|
klass->render_layout = gtk_theming_engine_render_layout;
|
2010-03-27 20:17:22 +00:00
|
|
|
|
klass->render_line = gtk_theming_engine_render_line;
|
2010-03-27 20:20:21 +00:00
|
|
|
|
klass->render_slider = gtk_theming_engine_render_slider;
|
2010-03-27 20:23:13 +00:00
|
|
|
|
klass->render_frame_gap = gtk_theming_engine_render_frame_gap;
|
2010-03-27 20:25:33 +00:00
|
|
|
|
klass->render_extension = gtk_theming_engine_render_extension;
|
2010-03-27 20:27:52 +00:00
|
|
|
|
klass->render_handle = gtk_theming_engine_render_handle;
|
2010-11-01 01:46:35 +00:00
|
|
|
|
klass->render_activity = gtk_theming_engine_render_activity;
|
2010-11-03 20:14:08 +00:00
|
|
|
|
klass->render_icon_pixbuf = gtk_theming_engine_render_icon_pixbuf;
|
2013-06-24 10:35:39 +00:00
|
|
|
|
klass->render_icon_surface = gtk_theming_engine_render_icon_surface;
|
2010-03-20 13:17:40 +00:00
|
|
|
|
|
2010-10-25 22:43:20 +00:00
|
|
|
|
/**
|
|
|
|
|
* GtkThemingEngine:name:
|
|
|
|
|
*
|
|
|
|
|
* The theming engine name, this name will be used when registering
|
|
|
|
|
* custom properties, for a theming engine named "Clearlooks" registering
|
|
|
|
|
* a "glossy" custom property, it could be referenced in the CSS file as
|
|
|
|
|
*
|
2014-01-27 17:12:55 +00:00
|
|
|
|
* |[
|
2010-10-25 22:43:20 +00:00
|
|
|
|
* -Clearlooks-glossy: true;
|
2014-01-27 17:12:55 +00:00
|
|
|
|
* ]|
|
2010-10-25 22:43:20 +00:00
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
|
|
|
|
*/
|
|
|
|
|
g_object_class_install_property (object_class,
|
|
|
|
|
PROP_NAME,
|
|
|
|
|
g_param_spec_string ("name",
|
|
|
|
|
P_("Name"),
|
|
|
|
|
P_("Theming engine name"),
|
|
|
|
|
NULL,
|
|
|
|
|
G_PARAM_CONSTRUCT_ONLY | GTK_PARAM_READWRITE));
|
2010-03-13 10:23:23 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_init (GtkThemingEngine *engine)
|
|
|
|
|
{
|
2013-06-27 19:02:52 +00:00
|
|
|
|
engine->priv = gtk_theming_engine_get_instance_private (engine);
|
2010-03-13 10:23:23 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-10-25 22:43:20 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_finalize (GObject *object)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
priv = GTK_THEMING_ENGINE (object)->priv;
|
|
|
|
|
g_free (priv->name);
|
|
|
|
|
|
2013-05-03 01:36:45 +00:00
|
|
|
|
G_OBJECT_CLASS (gtk_theming_engine_parent_class)->finalize (object);
|
2010-10-25 22:43:20 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_impl_set_property (GObject *object,
|
|
|
|
|
guint prop_id,
|
|
|
|
|
const GValue *value,
|
|
|
|
|
GParamSpec *pspec)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
priv = GTK_THEMING_ENGINE (object)->priv;
|
|
|
|
|
|
|
|
|
|
switch (prop_id)
|
|
|
|
|
{
|
|
|
|
|
case PROP_NAME:
|
2014-07-14 15:02:13 +00:00
|
|
|
|
g_free (priv->name);
|
2010-10-25 22:43:20 +00:00
|
|
|
|
|
|
|
|
|
priv->name = g_value_dup_string (value);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_impl_get_property (GObject *object,
|
|
|
|
|
guint prop_id,
|
|
|
|
|
GValue *value,
|
|
|
|
|
GParamSpec *pspec)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
priv = GTK_THEMING_ENGINE (object)->priv;
|
|
|
|
|
|
|
|
|
|
switch (prop_id)
|
|
|
|
|
{
|
|
|
|
|
case PROP_NAME:
|
|
|
|
|
g_value_set_string (value, priv->name);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-10-19 08:59:46 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_get_property:
|
|
|
|
|
* @engine: a #GtkThemingEngine
|
|
|
|
|
* @property: the property name
|
|
|
|
|
* @state: state to retrieve the value for
|
|
|
|
|
* @value: (out) (transfer full): return location for the property value,
|
|
|
|
|
* you must free this memory using g_value_unset() once you are
|
|
|
|
|
* done with it.
|
|
|
|
|
*
|
|
|
|
|
* Gets a property value as retrieved from the style settings that apply
|
|
|
|
|
* to the currently rendered element.
|
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2014-06-15 14:05:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-10-19 08:59:46 +00:00
|
|
|
|
**/
|
2010-03-13 10:23:23 +00:00
|
|
|
|
void
|
|
|
|
|
gtk_theming_engine_get_property (GtkThemingEngine *engine,
|
|
|
|
|
const gchar *property,
|
2010-08-16 17:09:34 +00:00
|
|
|
|
GtkStateFlags state,
|
2010-03-13 10:23:23 +00:00
|
|
|
|
GValue *value)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_THEMING_ENGINE (engine));
|
|
|
|
|
g_return_if_fail (property != NULL);
|
|
|
|
|
g_return_if_fail (value != NULL);
|
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
|
|
|
|
gtk_style_context_get_property (priv->context, property, state, value);
|
|
|
|
|
}
|
|
|
|
|
|
2010-10-19 08:59:46 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_get_valist:
|
|
|
|
|
* @engine: a #GtkThemingEngine
|
|
|
|
|
* @state: state to retrieve values for
|
|
|
|
|
* @args: va_list of property name/return location pairs, followed by %NULL
|
|
|
|
|
*
|
|
|
|
|
* Retrieves several style property values that apply to the currently
|
|
|
|
|
* rendered element.
|
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2014-06-15 14:05:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-10-19 08:59:46 +00:00
|
|
|
|
**/
|
2010-03-13 10:23:23 +00:00
|
|
|
|
void
|
|
|
|
|
gtk_theming_engine_get_valist (GtkThemingEngine *engine,
|
2010-08-16 17:09:34 +00:00
|
|
|
|
GtkStateFlags state,
|
2010-03-13 10:23:23 +00:00
|
|
|
|
va_list args)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_THEMING_ENGINE (engine));
|
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
|
|
|
|
gtk_style_context_get_valist (priv->context, state, args);
|
|
|
|
|
}
|
|
|
|
|
|
2010-10-19 08:59:46 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_get:
|
|
|
|
|
* @engine: a #GtkThemingEngine
|
|
|
|
|
* @state: state to retrieve values for
|
|
|
|
|
* @...: property name /return value pairs, followed by %NULL
|
|
|
|
|
*
|
|
|
|
|
* Retrieves several style property values that apply to the currently
|
|
|
|
|
* rendered element.
|
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2014-06-15 14:05:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-10-19 08:59:46 +00:00
|
|
|
|
**/
|
2010-03-13 10:23:23 +00:00
|
|
|
|
void
|
|
|
|
|
gtk_theming_engine_get (GtkThemingEngine *engine,
|
2010-08-16 17:09:34 +00:00
|
|
|
|
GtkStateFlags state,
|
2010-03-13 10:23:23 +00:00
|
|
|
|
...)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
va_list args;
|
|
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_THEMING_ENGINE (engine));
|
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
|
|
|
|
|
|
|
|
|
va_start (args, state);
|
|
|
|
|
gtk_style_context_get_valist (priv->context, state, args);
|
|
|
|
|
va_end (args);
|
|
|
|
|
}
|
|
|
|
|
|
2010-10-19 08:59:46 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_get_style_property:
|
|
|
|
|
* @engine: a #GtkThemingEngine
|
|
|
|
|
* @property_name: the name of the widget style property
|
2014-08-20 06:55:53 +00:00
|
|
|
|
* @value: (out): Return location for the property value, free with
|
2010-10-19 08:59:46 +00:00
|
|
|
|
* g_value_unset() after use.
|
|
|
|
|
*
|
|
|
|
|
* Gets the value for a widget style property.
|
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2014-06-15 14:05:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-10-19 08:59:46 +00:00
|
|
|
|
**/
|
2010-08-02 13:33:20 +00:00
|
|
|
|
void
|
|
|
|
|
gtk_theming_engine_get_style_property (GtkThemingEngine *engine,
|
|
|
|
|
const gchar *property_name,
|
|
|
|
|
GValue *value)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_THEMING_ENGINE (engine));
|
|
|
|
|
g_return_if_fail (property_name != NULL);
|
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
|
|
|
|
gtk_style_context_get_style_property (priv->context, property_name, value);
|
|
|
|
|
}
|
|
|
|
|
|
2010-10-19 08:59:46 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_get_style_valist:
|
|
|
|
|
* @engine: a #GtkThemingEngine
|
|
|
|
|
* @args: va_list of property name/return location pairs, followed by %NULL
|
|
|
|
|
*
|
|
|
|
|
* Retrieves several widget style properties from @engine according to the
|
2014-02-07 18:01:26 +00:00
|
|
|
|
* currently rendered content’s style.
|
2010-10-19 08:59:46 +00:00
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2014-06-15 14:05:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-10-19 08:59:46 +00:00
|
|
|
|
**/
|
2010-08-02 13:33:20 +00:00
|
|
|
|
void
|
|
|
|
|
gtk_theming_engine_get_style_valist (GtkThemingEngine *engine,
|
|
|
|
|
va_list args)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_THEMING_ENGINE (engine));
|
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
|
|
|
|
gtk_style_context_get_style_valist (priv->context, args);
|
|
|
|
|
}
|
|
|
|
|
|
2010-10-19 08:59:46 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_get_style:
|
|
|
|
|
* @engine: a #GtkThemingEngine
|
|
|
|
|
* @...: property name /return value pairs, followed by %NULL
|
|
|
|
|
*
|
|
|
|
|
* Retrieves several widget style properties from @engine according
|
2014-02-07 18:01:26 +00:00
|
|
|
|
* to the currently rendered content’s style.
|
2010-10-19 08:59:46 +00:00
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2014-06-15 14:05:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-10-19 08:59:46 +00:00
|
|
|
|
**/
|
2010-08-02 13:33:20 +00:00
|
|
|
|
void
|
|
|
|
|
gtk_theming_engine_get_style (GtkThemingEngine *engine,
|
|
|
|
|
...)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
va_list args;
|
|
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_THEMING_ENGINE (engine));
|
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
|
|
|
|
|
|
|
|
|
va_start (args, engine);
|
|
|
|
|
gtk_style_context_get_style_valist (priv->context, args);
|
|
|
|
|
va_end (args);
|
|
|
|
|
}
|
|
|
|
|
|
2010-12-01 18:19:26 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_lookup_color:
|
|
|
|
|
* @engine: a #GtkThemingEngine
|
|
|
|
|
* @color_name: color name to lookup
|
2010-12-04 14:08:35 +00:00
|
|
|
|
* @color: (out): Return location for the looked up color
|
2010-12-01 18:19:26 +00:00
|
|
|
|
*
|
2014-02-07 18:01:26 +00:00
|
|
|
|
* Looks up and resolves a color name in the current style’s color map.
|
2010-12-09 22:55:33 +00:00
|
|
|
|
*
|
|
|
|
|
* Returns: %TRUE if @color_name was found and resolved, %FALSE otherwise
|
2014-06-15 14:05:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-12-01 18:19:26 +00:00
|
|
|
|
**/
|
2010-12-09 22:55:33 +00:00
|
|
|
|
gboolean
|
2010-12-04 14:08:35 +00:00
|
|
|
|
gtk_theming_engine_lookup_color (GtkThemingEngine *engine,
|
|
|
|
|
const gchar *color_name,
|
|
|
|
|
GdkRGBA *color)
|
2010-12-01 18:19:26 +00:00
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
2010-12-09 22:55:33 +00:00
|
|
|
|
g_return_val_if_fail (GTK_IS_THEMING_ENGINE (engine), FALSE);
|
|
|
|
|
g_return_val_if_fail (color_name != NULL, FALSE);
|
2010-12-01 18:19:26 +00:00
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
2010-12-09 22:55:33 +00:00
|
|
|
|
return gtk_style_context_lookup_color (priv->context, color_name, color);
|
2010-12-01 18:19:26 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-10-19 08:59:46 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_get_state:
|
|
|
|
|
* @engine: a #GtkThemingEngine
|
|
|
|
|
*
|
|
|
|
|
* returns the state used when rendering.
|
|
|
|
|
*
|
|
|
|
|
* Returns: the state flags
|
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2014-06-15 14:05:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-10-19 08:59:46 +00:00
|
|
|
|
**/
|
2010-03-13 10:23:23 +00:00
|
|
|
|
GtkStateFlags
|
|
|
|
|
gtk_theming_engine_get_state (GtkThemingEngine *engine)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
g_return_val_if_fail (GTK_IS_THEMING_ENGINE (engine), 0);
|
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
|
|
|
|
return gtk_style_context_get_state (priv->context);
|
|
|
|
|
}
|
|
|
|
|
|
2010-10-19 10:09:23 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_state_is_running:
|
|
|
|
|
* @engine: a #GtkThemingEngine
|
|
|
|
|
* @state: a widget state
|
|
|
|
|
* @progress: (out): return location for the transition progress
|
|
|
|
|
*
|
|
|
|
|
* Returns %TRUE if there is a transition animation running for the
|
|
|
|
|
* current region (see gtk_style_context_push_animatable_region()).
|
|
|
|
|
*
|
|
|
|
|
* If @progress is not %NULL, the animation progress will be returned
|
|
|
|
|
* there, 0.0 means the state is closest to being %FALSE, while 1.0 means
|
2014-02-07 18:01:26 +00:00
|
|
|
|
* it’s closest to being %TRUE. This means transition animations will
|
2010-10-19 10:09:23 +00:00
|
|
|
|
* run from 0 to 1 when @state is being set to %TRUE and from 1 to 0 when
|
2014-02-07 18:01:26 +00:00
|
|
|
|
* it’s being set to %FALSE.
|
2010-10-19 10:09:23 +00:00
|
|
|
|
*
|
|
|
|
|
* Returns: %TRUE if there is a running transition animation for @state.
|
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2012-04-04 16:55:51 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.6: Always returns %FALSE
|
2010-10-19 10:09:23 +00:00
|
|
|
|
**/
|
2010-03-13 10:23:23 +00:00
|
|
|
|
gboolean
|
2010-10-19 10:09:23 +00:00
|
|
|
|
gtk_theming_engine_state_is_running (GtkThemingEngine *engine,
|
|
|
|
|
GtkStateType state,
|
|
|
|
|
gdouble *progress)
|
2010-03-13 10:23:23 +00:00
|
|
|
|
{
|
2010-10-19 10:09:23 +00:00
|
|
|
|
g_return_val_if_fail (GTK_IS_THEMING_ENGINE (engine), FALSE);
|
2010-03-13 10:23:23 +00:00
|
|
|
|
|
2012-04-04 16:55:51 +00:00
|
|
|
|
return FALSE;
|
2010-03-13 10:23:23 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-10-19 08:59:46 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_get_path:
|
|
|
|
|
* @engine: a #GtkThemingEngine
|
|
|
|
|
*
|
|
|
|
|
* Returns the widget path used for style matching.
|
|
|
|
|
*
|
|
|
|
|
* Returns: (transfer none): A #GtkWidgetPath
|
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2014-06-15 14:05:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-10-19 08:59:46 +00:00
|
|
|
|
**/
|
2011-06-06 18:13:44 +00:00
|
|
|
|
const GtkWidgetPath *
|
2010-03-13 10:23:23 +00:00
|
|
|
|
gtk_theming_engine_get_path (GtkThemingEngine *engine)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
g_return_val_if_fail (GTK_IS_THEMING_ENGINE (engine), NULL);
|
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
|
|
|
|
return gtk_style_context_get_path (priv->context);
|
|
|
|
|
}
|
|
|
|
|
|
2010-10-19 08:59:46 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_has_class:
|
|
|
|
|
* @engine: a #GtkThemingEngine
|
|
|
|
|
* @style_class: class name to look up
|
|
|
|
|
*
|
|
|
|
|
* Returns %TRUE if the currently rendered contents have
|
|
|
|
|
* defined the given class name.
|
|
|
|
|
*
|
|
|
|
|
* Returns: %TRUE if @engine has @class_name defined
|
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2014-06-15 14:05:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-10-19 08:59:46 +00:00
|
|
|
|
**/
|
2010-03-20 13:13:50 +00:00
|
|
|
|
gboolean
|
|
|
|
|
gtk_theming_engine_has_class (GtkThemingEngine *engine,
|
|
|
|
|
const gchar *style_class)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
g_return_val_if_fail (GTK_IS_THEMING_ENGINE (engine), FALSE);
|
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
|
|
|
|
return gtk_style_context_has_class (priv->context, style_class);
|
|
|
|
|
}
|
|
|
|
|
|
2010-10-19 08:59:46 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_has_region:
|
|
|
|
|
* @engine: a #GtkThemingEngine
|
|
|
|
|
* @style_region: a region name
|
|
|
|
|
* @flags: (out) (allow-none): return location for region flags
|
|
|
|
|
*
|
|
|
|
|
* Returns %TRUE if the currently rendered contents have the
|
|
|
|
|
* region defined. If @flags_return is not %NULL, it is set
|
|
|
|
|
* to the flags affecting the region.
|
|
|
|
|
*
|
|
|
|
|
* Returns: %TRUE if region is defined
|
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2014-06-19 18:00:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-10-19 08:59:46 +00:00
|
|
|
|
**/
|
2010-03-20 13:13:50 +00:00
|
|
|
|
gboolean
|
2010-08-05 09:08:51 +00:00
|
|
|
|
gtk_theming_engine_has_region (GtkThemingEngine *engine,
|
2010-10-19 08:59:46 +00:00
|
|
|
|
const gchar *style_region,
|
2010-08-05 09:08:51 +00:00
|
|
|
|
GtkRegionFlags *flags)
|
2010-03-20 13:13:50 +00:00
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
if (flags)
|
|
|
|
|
*flags = 0;
|
|
|
|
|
|
|
|
|
|
g_return_val_if_fail (GTK_IS_THEMING_ENGINE (engine), FALSE);
|
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
2014-06-19 18:00:16 +00:00
|
|
|
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
2010-10-19 08:59:46 +00:00
|
|
|
|
return gtk_style_context_has_region (priv->context, style_region, flags);
|
2014-06-19 18:00:16 +00:00
|
|
|
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
2010-03-20 13:13:50 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-10-19 08:59:46 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_get_direction:
|
|
|
|
|
* @engine: a #GtkThemingEngine
|
|
|
|
|
*
|
|
|
|
|
* Returns the widget direction used for rendering.
|
|
|
|
|
*
|
|
|
|
|
* Returns: the widget direction
|
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2012-12-18 17:05:28 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.8: Use gtk_theming_engine_get_state() and
|
|
|
|
|
* check for #GTK_STATE_FLAG_DIR_LTR and
|
|
|
|
|
* #GTK_STATE_FLAG_DIR_RTL instead.
|
2010-10-19 08:59:46 +00:00
|
|
|
|
**/
|
2010-08-03 18:26:53 +00:00
|
|
|
|
GtkTextDirection
|
|
|
|
|
gtk_theming_engine_get_direction (GtkThemingEngine *engine)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
g_return_val_if_fail (GTK_IS_THEMING_ENGINE (engine), GTK_TEXT_DIR_LTR);
|
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
2012-12-18 17:05:28 +00:00
|
|
|
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
2010-08-03 18:26:53 +00:00
|
|
|
|
return gtk_style_context_get_direction (priv->context);
|
2012-12-18 17:05:28 +00:00
|
|
|
|
G_GNUC_END_IGNORE_DEPRECATIONS;
|
2010-08-03 18:26:53 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-10-19 08:59:46 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_get_junction_sides:
|
|
|
|
|
* @engine: a #GtkThemingEngine
|
|
|
|
|
*
|
|
|
|
|
* Returns the widget direction used for rendering.
|
|
|
|
|
*
|
|
|
|
|
* Returns: the widget direction
|
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2014-06-15 14:05:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-10-19 08:59:46 +00:00
|
|
|
|
**/
|
2010-08-03 18:36:09 +00:00
|
|
|
|
GtkJunctionSides
|
|
|
|
|
gtk_theming_engine_get_junction_sides (GtkThemingEngine *engine)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
g_return_val_if_fail (GTK_IS_THEMING_ENGINE (engine), 0);
|
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
|
|
|
|
return gtk_style_context_get_junction_sides (priv->context);
|
|
|
|
|
}
|
|
|
|
|
|
2010-12-02 22:41:24 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_get_color:
|
|
|
|
|
* @engine: a #GtkThemingEngine
|
|
|
|
|
* @state: state to retrieve the color for
|
|
|
|
|
* @color: (out): return value for the foreground color
|
|
|
|
|
*
|
|
|
|
|
* Gets the foreground color for a given state.
|
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2014-06-15 14:05:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-12-02 22:41:24 +00:00
|
|
|
|
**/
|
|
|
|
|
void
|
|
|
|
|
gtk_theming_engine_get_color (GtkThemingEngine *engine,
|
|
|
|
|
GtkStateFlags state,
|
|
|
|
|
GdkRGBA *color)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_THEMING_ENGINE (engine));
|
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
|
|
|
|
gtk_style_context_get_color (priv->context, state, color);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_get_background_color:
|
|
|
|
|
* @engine: a #GtkThemingEngine
|
|
|
|
|
* @state: state to retrieve the color for
|
|
|
|
|
* @color: (out): return value for the background color
|
|
|
|
|
*
|
|
|
|
|
* Gets the background color for a given state.
|
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2014-06-15 14:05:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-12-02 22:41:24 +00:00
|
|
|
|
**/
|
|
|
|
|
void
|
|
|
|
|
gtk_theming_engine_get_background_color (GtkThemingEngine *engine,
|
|
|
|
|
GtkStateFlags state,
|
|
|
|
|
GdkRGBA *color)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_THEMING_ENGINE (engine));
|
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
|
|
|
|
gtk_style_context_get_background_color (priv->context, state, color);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_get_border_color:
|
|
|
|
|
* @engine: a #GtkThemingEngine
|
|
|
|
|
* @state: state to retrieve the color for
|
|
|
|
|
* @color: (out): return value for the border color
|
|
|
|
|
*
|
|
|
|
|
* Gets the border color for a given state.
|
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2014-06-15 14:05:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-12-02 22:41:24 +00:00
|
|
|
|
**/
|
|
|
|
|
void
|
|
|
|
|
gtk_theming_engine_get_border_color (GtkThemingEngine *engine,
|
|
|
|
|
GtkStateFlags state,
|
|
|
|
|
GdkRGBA *color)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_THEMING_ENGINE (engine));
|
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
|
|
|
|
gtk_style_context_get_border_color (priv->context, state, color);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_get_border:
|
2012-07-02 06:19:06 +00:00
|
|
|
|
* @engine: a #GtkThemingEngine
|
2010-12-02 22:41:24 +00:00
|
|
|
|
* @state: state to retrieve the border for
|
2011-01-06 13:12:01 +00:00
|
|
|
|
* @border: (out): return value for the border settings
|
2010-12-02 22:41:24 +00:00
|
|
|
|
*
|
|
|
|
|
* Gets the border for a given state as a #GtkBorder.
|
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2014-06-15 14:05:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-12-02 22:41:24 +00:00
|
|
|
|
**/
|
|
|
|
|
void
|
|
|
|
|
gtk_theming_engine_get_border (GtkThemingEngine *engine,
|
|
|
|
|
GtkStateFlags state,
|
|
|
|
|
GtkBorder *border)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_THEMING_ENGINE (engine));
|
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
|
|
|
|
gtk_style_context_get_border (priv->context, state, border);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_get_padding:
|
2012-07-02 06:19:06 +00:00
|
|
|
|
* @engine: a #GtkThemingEngine
|
2010-12-02 22:41:24 +00:00
|
|
|
|
* @state: state to retrieve the padding for
|
2010-12-17 19:47:56 +00:00
|
|
|
|
* @padding: (out): return value for the padding settings
|
2010-12-02 22:41:24 +00:00
|
|
|
|
*
|
|
|
|
|
* Gets the padding for a given state as a #GtkBorder.
|
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2014-06-15 14:05:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-12-02 22:41:24 +00:00
|
|
|
|
**/
|
|
|
|
|
void
|
|
|
|
|
gtk_theming_engine_get_padding (GtkThemingEngine *engine,
|
|
|
|
|
GtkStateFlags state,
|
|
|
|
|
GtkBorder *padding)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_THEMING_ENGINE (engine));
|
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
|
|
|
|
gtk_style_context_get_padding (priv->context, state, padding);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_get_margin:
|
2010-12-17 19:47:56 +00:00
|
|
|
|
* @engine: a #GtkThemingEngine
|
2010-12-02 22:41:24 +00:00
|
|
|
|
* @state: state to retrieve the border for
|
2010-12-17 19:47:56 +00:00
|
|
|
|
* @margin: (out): return value for the margin settings
|
2010-12-02 22:41:24 +00:00
|
|
|
|
*
|
|
|
|
|
* Gets the margin for a given state as a #GtkBorder.
|
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2014-06-15 14:05:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-12-02 22:41:24 +00:00
|
|
|
|
**/
|
|
|
|
|
void
|
|
|
|
|
gtk_theming_engine_get_margin (GtkThemingEngine *engine,
|
|
|
|
|
GtkStateFlags state,
|
|
|
|
|
GtkBorder *margin)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
g_return_if_fail (GTK_IS_THEMING_ENGINE (engine));
|
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
|
|
|
|
gtk_style_context_get_margin (priv->context, state, margin);
|
|
|
|
|
}
|
|
|
|
|
|
2010-12-13 20:36:49 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_get_font:
|
|
|
|
|
* @engine: a #GtkThemingEngine
|
|
|
|
|
* @state: state to retrieve the font for
|
|
|
|
|
*
|
|
|
|
|
* Returns the font description for a given state.
|
|
|
|
|
*
|
2011-01-18 09:01:17 +00:00
|
|
|
|
* Returns: (transfer none): the #PangoFontDescription for the given
|
|
|
|
|
* state. This object is owned by GTK+ and should not be
|
|
|
|
|
* freed.
|
2010-12-13 20:36:49 +00:00
|
|
|
|
*
|
|
|
|
|
* Since: 3.0
|
2012-12-06 01:55:22 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.8: Use gtk_theming_engine_get()
|
2010-12-13 20:36:49 +00:00
|
|
|
|
**/
|
|
|
|
|
const PangoFontDescription *
|
|
|
|
|
gtk_theming_engine_get_font (GtkThemingEngine *engine,
|
|
|
|
|
GtkStateFlags state)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
g_return_val_if_fail (GTK_IS_THEMING_ENGINE (engine), NULL);
|
|
|
|
|
|
2012-12-06 01:55:22 +00:00
|
|
|
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
|
2010-12-13 20:36:49 +00:00
|
|
|
|
priv = engine->priv;
|
|
|
|
|
return gtk_style_context_get_font (priv->context, state);
|
2012-12-06 01:55:22 +00:00
|
|
|
|
G_GNUC_END_IGNORE_DEPRECATIONS;
|
2010-12-13 20:36:49 +00:00
|
|
|
|
}
|
2010-12-02 22:41:24 +00:00
|
|
|
|
|
2010-03-13 17:35:35 +00:00
|
|
|
|
/* GtkThemingModule */
|
|
|
|
|
|
|
|
|
|
static gboolean
|
|
|
|
|
gtk_theming_module_load (GTypeModule *type_module)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingModule *theming_module;
|
|
|
|
|
GModule *module;
|
|
|
|
|
gchar *name, *module_path;
|
|
|
|
|
|
|
|
|
|
theming_module = GTK_THEMING_MODULE (type_module);
|
|
|
|
|
name = theming_module->name;
|
|
|
|
|
module_path = _gtk_find_module (name, "theming-engines");
|
|
|
|
|
|
|
|
|
|
if (!module_path)
|
2010-12-06 05:44:01 +00:00
|
|
|
|
return FALSE;
|
2010-03-13 17:35:35 +00:00
|
|
|
|
|
|
|
|
|
module = g_module_open (module_path, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
|
|
|
|
|
g_free (module_path);
|
|
|
|
|
|
|
|
|
|
if (!module)
|
2010-12-06 05:44:01 +00:00
|
|
|
|
return FALSE;
|
2010-03-13 17:35:35 +00:00
|
|
|
|
|
2010-10-20 11:26:27 +00:00
|
|
|
|
if (!g_module_symbol (module, "theme_init",
|
|
|
|
|
(gpointer *) &theming_module->init) ||
|
|
|
|
|
!g_module_symbol (module, "theme_exit",
|
|
|
|
|
(gpointer *) &theming_module->exit) ||
|
|
|
|
|
!g_module_symbol (module, "create_engine",
|
2010-03-13 17:35:35 +00:00
|
|
|
|
(gpointer *) &theming_module->create_engine))
|
|
|
|
|
{
|
|
|
|
|
g_module_close (module);
|
|
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
|
2010-10-20 11:26:27 +00:00
|
|
|
|
theming_module->module = module;
|
|
|
|
|
|
2010-11-03 20:12:57 +00:00
|
|
|
|
theming_module->init (G_TYPE_MODULE (theming_module));
|
2010-03-13 17:35:35 +00:00
|
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
2010-10-20 11:26:27 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_theming_module_unload (GTypeModule *type_module)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingModule *theming_module;
|
|
|
|
|
|
|
|
|
|
theming_module = GTK_THEMING_MODULE (type_module);
|
|
|
|
|
|
|
|
|
|
theming_module->exit ();
|
|
|
|
|
|
|
|
|
|
g_module_close (theming_module->module);
|
|
|
|
|
|
|
|
|
|
theming_module->module = NULL;
|
|
|
|
|
theming_module->init = NULL;
|
|
|
|
|
theming_module->exit = NULL;
|
|
|
|
|
theming_module->create_engine = NULL;
|
|
|
|
|
}
|
|
|
|
|
|
2010-03-13 17:35:35 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_theming_module_class_init (GtkThemingModuleClass *klass)
|
|
|
|
|
{
|
|
|
|
|
GTypeModuleClass *module_class = G_TYPE_MODULE_CLASS (klass);
|
|
|
|
|
|
|
|
|
|
module_class->load = gtk_theming_module_load;
|
2010-10-20 11:26:27 +00:00
|
|
|
|
module_class->unload = gtk_theming_module_unload;
|
2010-03-13 17:35:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
gtk_theming_module_init (GtkThemingModule *module)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2010-10-19 08:59:46 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_load:
|
|
|
|
|
* @name: Theme engine name to load
|
|
|
|
|
*
|
|
|
|
|
* Loads and initializes a theming engine module from the
|
|
|
|
|
* standard directories.
|
|
|
|
|
*
|
|
|
|
|
* Returns: (transfer none): A theming engine, or %NULL if
|
2014-02-07 18:32:47 +00:00
|
|
|
|
* the engine @name doesn’t exist.
|
2014-06-15 14:05:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-10-19 08:59:46 +00:00
|
|
|
|
**/
|
2010-10-08 16:13:14 +00:00
|
|
|
|
GtkThemingEngine *
|
2010-03-13 17:35:35 +00:00
|
|
|
|
gtk_theming_engine_load (const gchar *name)
|
|
|
|
|
{
|
|
|
|
|
static GHashTable *engines = NULL;
|
|
|
|
|
static GtkThemingEngine *default_engine;
|
|
|
|
|
GtkThemingEngine *engine = NULL;
|
|
|
|
|
|
|
|
|
|
if (name)
|
|
|
|
|
{
|
|
|
|
|
if (!engines)
|
|
|
|
|
engines = g_hash_table_new (g_str_hash, g_str_equal);
|
|
|
|
|
|
|
|
|
|
engine = g_hash_table_lookup (engines, name);
|
|
|
|
|
|
|
|
|
|
if (!engine)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingModule *module;
|
|
|
|
|
|
|
|
|
|
module = g_object_new (GTK_TYPE_THEMING_MODULE, NULL);
|
|
|
|
|
g_type_module_set_name (G_TYPE_MODULE (module), name);
|
|
|
|
|
module->name = g_strdup (name);
|
|
|
|
|
|
|
|
|
|
if (module && g_type_module_use (G_TYPE_MODULE (module)))
|
|
|
|
|
{
|
|
|
|
|
engine = (module->create_engine) ();
|
|
|
|
|
|
|
|
|
|
if (engine)
|
|
|
|
|
g_hash_table_insert (engines, module->name, engine);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2011-07-21 00:41:10 +00:00
|
|
|
|
else
|
2010-03-13 17:35:35 +00:00
|
|
|
|
{
|
2010-06-13 15:31:22 +00:00
|
|
|
|
if (G_UNLIKELY (!default_engine))
|
2010-03-13 17:35:35 +00:00
|
|
|
|
default_engine = g_object_new (GTK_TYPE_THEMING_ENGINE, NULL);
|
|
|
|
|
|
|
|
|
|
engine = default_engine;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return engine;
|
|
|
|
|
}
|
|
|
|
|
|
2010-10-19 08:59:46 +00:00
|
|
|
|
/**
|
|
|
|
|
* gtk_theming_engine_get_screen:
|
|
|
|
|
* @engine: a #GtkThemingEngine
|
|
|
|
|
*
|
|
|
|
|
* Returns the #GdkScreen to which @engine currently rendering to.
|
|
|
|
|
*
|
2011-01-18 09:01:17 +00:00
|
|
|
|
* Returns: (transfer none): a #GdkScreen, or %NULL.
|
2014-06-15 14:05:16 +00:00
|
|
|
|
*
|
|
|
|
|
* Deprecated: 3.14
|
2010-10-19 08:59:46 +00:00
|
|
|
|
**/
|
2010-07-03 11:21:56 +00:00
|
|
|
|
GdkScreen *
|
|
|
|
|
gtk_theming_engine_get_screen (GtkThemingEngine *engine)
|
|
|
|
|
{
|
|
|
|
|
GtkThemingEnginePrivate *priv;
|
|
|
|
|
|
|
|
|
|
g_return_val_if_fail (GTK_IS_THEMING_ENGINE (engine), NULL);
|
|
|
|
|
|
|
|
|
|
priv = engine->priv;
|
|
|
|
|
return gtk_style_context_get_screen (priv->context);
|
|
|
|
|
}
|
|
|
|
|
|
2010-03-20 13:17:40 +00:00
|
|
|
|
/* Paint method implementations */
|
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_render_check (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
|
|
|
|
gdouble height)
|
|
|
|
|
{
|
2014-06-16 14:23:11 +00:00
|
|
|
|
gtk_render_check (engine->priv->context, cr, x, y, width, height);
|
2010-03-20 13:17:40 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-03-20 16:37:34 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_render_option (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
|
|
|
|
gdouble height)
|
|
|
|
|
{
|
2014-06-16 14:23:11 +00:00
|
|
|
|
gtk_render_option (engine->priv->context, cr, x, y, width, height);
|
2010-03-20 16:37:34 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-03-27 17:50:39 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_render_arrow (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble angle,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble size)
|
|
|
|
|
{
|
2014-06-16 14:23:11 +00:00
|
|
|
|
gtk_render_arrow (engine->priv->context, cr, angle, x, y, size);
|
2010-03-27 19:11:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-11-29 10:24:04 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_render_background (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
|
|
|
|
gdouble height)
|
|
|
|
|
{
|
2014-06-16 14:23:11 +00:00
|
|
|
|
gtk_render_background (engine->priv->context, cr, x, y, width, height);
|
2012-01-08 01:41:30 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-11-15 22:28:06 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_render_frame (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
|
|
|
|
gdouble height)
|
|
|
|
|
{
|
2014-06-16 14:23:11 +00:00
|
|
|
|
gtk_render_frame (engine->priv->context, cr, x, y, width, height);
|
2010-11-15 22:28:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-03-27 19:15:45 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_render_expander (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
|
|
|
|
gdouble height)
|
|
|
|
|
{
|
2014-06-16 14:23:11 +00:00
|
|
|
|
gtk_render_expander (engine->priv->context, cr, x, y, width, height);
|
2010-03-27 19:15:45 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-03-27 19:18:38 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_render_focus (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
|
|
|
|
gdouble height)
|
|
|
|
|
{
|
2014-06-16 14:23:11 +00:00
|
|
|
|
gtk_render_focus (engine->priv->context, cr, x, y, width, height);
|
2010-03-27 19:18:38 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-03-27 20:17:22 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_render_line (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x0,
|
|
|
|
|
gdouble y0,
|
|
|
|
|
gdouble x1,
|
|
|
|
|
gdouble y1)
|
|
|
|
|
{
|
2014-06-16 14:23:11 +00:00
|
|
|
|
gtk_render_line (engine->priv->context, cr, x0, y0, x1, y1);
|
2011-05-03 16:45:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-03-27 19:21:55 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_render_layout (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
PangoLayout *layout)
|
|
|
|
|
{
|
2014-06-16 14:23:11 +00:00
|
|
|
|
gtk_render_layout (engine->priv->context, cr, x, y, layout);
|
2010-03-27 19:21:55 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-03-27 20:20:21 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_render_slider (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
|
|
|
|
gdouble height,
|
|
|
|
|
GtkOrientation orientation)
|
|
|
|
|
{
|
2014-06-16 14:23:11 +00:00
|
|
|
|
gtk_render_slider (engine->priv->context, cr, x, y, width, height, orientation);
|
2010-03-27 20:20:21 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-03-27 20:23:13 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_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)
|
|
|
|
|
{
|
2014-06-16 14:23:11 +00:00
|
|
|
|
gtk_render_frame_gap (engine->priv->context, cr, x, y, width, height, gap_side, xy0_gap, xy1_gap);
|
2010-03-27 20:23:13 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-03-27 20:25:33 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_render_extension (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
|
|
|
|
gdouble height,
|
|
|
|
|
GtkPositionType gap_side)
|
|
|
|
|
{
|
2014-06-16 14:23:11 +00:00
|
|
|
|
gtk_render_extension (engine->priv->context, cr, x, y, width, height, gap_side);
|
2010-03-27 20:27:52 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_render_handle (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
2010-10-12 22:52:50 +00:00
|
|
|
|
gdouble height)
|
2010-03-27 20:27:52 +00:00
|
|
|
|
{
|
2014-06-16 14:23:11 +00:00
|
|
|
|
gtk_render_handle (engine->priv->context, cr, x, y, width, height);
|
2011-06-06 15:38:45 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_render_activity (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y,
|
|
|
|
|
gdouble width,
|
|
|
|
|
gdouble height)
|
|
|
|
|
{
|
2014-06-16 14:23:11 +00:00
|
|
|
|
gtk_render_activity (engine->priv->context, cr, x, y, width, height);
|
2011-01-15 04:51:41 +00:00
|
|
|
|
}
|
|
|
|
|
|
2010-11-03 20:14:08 +00:00
|
|
|
|
static GdkPixbuf *
|
|
|
|
|
gtk_theming_engine_render_icon_pixbuf (GtkThemingEngine *engine,
|
|
|
|
|
const GtkIconSource *source,
|
|
|
|
|
GtkIconSize size)
|
|
|
|
|
{
|
2014-06-16 14:23:11 +00:00
|
|
|
|
return gtk_render_icon_pixbuf (engine->priv->context, source, size);
|
2010-11-03 20:14:08 +00:00
|
|
|
|
}
|
2011-06-06 14:23:06 +00:00
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_render_icon (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
GdkPixbuf *pixbuf,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y)
|
|
|
|
|
{
|
2014-06-16 14:23:11 +00:00
|
|
|
|
gtk_render_icon (engine->priv->context, cr, pixbuf, x, y);
|
2011-06-06 14:23:06 +00:00
|
|
|
|
}
|
|
|
|
|
|
2013-06-24 10:35:39 +00:00
|
|
|
|
static void
|
|
|
|
|
gtk_theming_engine_render_icon_surface (GtkThemingEngine *engine,
|
|
|
|
|
cairo_t *cr,
|
|
|
|
|
cairo_surface_t *surface,
|
|
|
|
|
gdouble x,
|
|
|
|
|
gdouble y)
|
|
|
|
|
{
|
2014-06-16 14:23:11 +00:00
|
|
|
|
gtk_render_icon_surface (engine->priv->context, cr, surface, x, y);
|
2013-06-24 10:35:39 +00:00
|
|
|
|
}
|
|
|
|
|
|
2014-06-15 14:05:16 +00:00
|
|
|
|
G_GNUC_END_IGNORE_DEPRECATIONS
|