themingengine: Call real API render functions
No need to call the private versions anymore now that the real ones don't call into the theming engine.
This commit is contained in:
parent
4d9d655b4e
commit
a0bf0a0f70
@ -20,8 +20,6 @@
|
||||
#include <math.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "gtkthemingengineprivate.h"
|
||||
|
||||
#include <gtk/gtkstylecontext.h>
|
||||
#include <gtk/gtkintl.h>
|
||||
|
||||
@ -30,7 +28,6 @@
|
||||
#include "gtkpango.h"
|
||||
#include "gtkrenderprivate.h"
|
||||
#include "gtkstylecontextprivate.h"
|
||||
#include "gtkthemingengineprivate.h"
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
@ -314,19 +311,6 @@ gtk_theming_engine_impl_get_property (GObject *object,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
_gtk_theming_engine_set_context (GtkThemingEngine *engine,
|
||||
GtkStyleContext *context)
|
||||
{
|
||||
GtkThemingEnginePrivate *priv;
|
||||
|
||||
g_return_if_fail (GTK_IS_THEMING_ENGINE (engine));
|
||||
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
|
||||
|
||||
priv = engine->priv;
|
||||
priv->context = context;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_theming_engine_get_property:
|
||||
* @engine: a #GtkThemingEngine
|
||||
@ -1044,7 +1028,7 @@ gtk_theming_engine_render_check (GtkThemingEngine *engine,
|
||||
gdouble width,
|
||||
gdouble height)
|
||||
{
|
||||
gtk_do_render_check (engine->priv->context, cr, x, y, width, height);
|
||||
gtk_render_check (engine->priv->context, cr, x, y, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1055,7 +1039,7 @@ gtk_theming_engine_render_option (GtkThemingEngine *engine,
|
||||
gdouble width,
|
||||
gdouble height)
|
||||
{
|
||||
gtk_do_render_option (engine->priv->context, cr, x, y, width, height);
|
||||
gtk_render_option (engine->priv->context, cr, x, y, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1066,7 +1050,7 @@ gtk_theming_engine_render_arrow (GtkThemingEngine *engine,
|
||||
gdouble y,
|
||||
gdouble size)
|
||||
{
|
||||
gtk_do_render_arrow (engine->priv->context, cr, angle, x, y, size);
|
||||
gtk_render_arrow (engine->priv->context, cr, angle, x, y, size);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1077,7 +1061,7 @@ gtk_theming_engine_render_background (GtkThemingEngine *engine,
|
||||
gdouble width,
|
||||
gdouble height)
|
||||
{
|
||||
gtk_do_render_background (engine->priv->context, cr, x, y, width, height);
|
||||
gtk_render_background (engine->priv->context, cr, x, y, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1088,7 +1072,7 @@ gtk_theming_engine_render_frame (GtkThemingEngine *engine,
|
||||
gdouble width,
|
||||
gdouble height)
|
||||
{
|
||||
gtk_do_render_frame (engine->priv->context, cr, x, y, width, height);
|
||||
gtk_render_frame (engine->priv->context, cr, x, y, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1099,7 +1083,7 @@ gtk_theming_engine_render_expander (GtkThemingEngine *engine,
|
||||
gdouble width,
|
||||
gdouble height)
|
||||
{
|
||||
gtk_do_render_expander (engine->priv->context, cr, x, y, width, height);
|
||||
gtk_render_expander (engine->priv->context, cr, x, y, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1110,7 +1094,7 @@ gtk_theming_engine_render_focus (GtkThemingEngine *engine,
|
||||
gdouble width,
|
||||
gdouble height)
|
||||
{
|
||||
gtk_do_render_focus (engine->priv->context, cr, x, y, width, height);
|
||||
gtk_render_focus (engine->priv->context, cr, x, y, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1121,7 +1105,7 @@ gtk_theming_engine_render_line (GtkThemingEngine *engine,
|
||||
gdouble x1,
|
||||
gdouble y1)
|
||||
{
|
||||
gtk_do_render_line (engine->priv->context, cr, x0, y0, x1, y1);
|
||||
gtk_render_line (engine->priv->context, cr, x0, y0, x1, y1);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1131,7 +1115,7 @@ gtk_theming_engine_render_layout (GtkThemingEngine *engine,
|
||||
gdouble y,
|
||||
PangoLayout *layout)
|
||||
{
|
||||
gtk_do_render_layout (engine->priv->context, cr, x, y, layout);
|
||||
gtk_render_layout (engine->priv->context, cr, x, y, layout);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1143,7 +1127,7 @@ gtk_theming_engine_render_slider (GtkThemingEngine *engine,
|
||||
gdouble height,
|
||||
GtkOrientation orientation)
|
||||
{
|
||||
gtk_do_render_slider (engine->priv->context, cr, x, y, width, height, orientation);
|
||||
gtk_render_slider (engine->priv->context, cr, x, y, width, height, orientation);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1157,7 +1141,7 @@ gtk_theming_engine_render_frame_gap (GtkThemingEngine *engine,
|
||||
gdouble xy0_gap,
|
||||
gdouble xy1_gap)
|
||||
{
|
||||
gtk_do_render_frame_gap (engine->priv->context, cr, x, y, width, height, gap_side, xy0_gap, xy1_gap);
|
||||
gtk_render_frame_gap (engine->priv->context, cr, x, y, width, height, gap_side, xy0_gap, xy1_gap);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1169,7 +1153,7 @@ gtk_theming_engine_render_extension (GtkThemingEngine *engine,
|
||||
gdouble height,
|
||||
GtkPositionType gap_side)
|
||||
{
|
||||
gtk_do_render_extension (engine->priv->context, cr, x, y, width, height, gap_side);
|
||||
gtk_render_extension (engine->priv->context, cr, x, y, width, height, gap_side);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1180,7 +1164,7 @@ gtk_theming_engine_render_handle (GtkThemingEngine *engine,
|
||||
gdouble width,
|
||||
gdouble height)
|
||||
{
|
||||
gtk_do_render_handle (engine->priv->context, cr, x, y, width, height);
|
||||
gtk_render_handle (engine->priv->context, cr, x, y, width, height);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1191,7 +1175,7 @@ gtk_theming_engine_render_activity (GtkThemingEngine *engine,
|
||||
gdouble width,
|
||||
gdouble height)
|
||||
{
|
||||
gtk_do_render_activity (engine->priv->context, cr, x, y, width, height);
|
||||
gtk_render_activity (engine->priv->context, cr, x, y, width, height);
|
||||
}
|
||||
|
||||
static GdkPixbuf *
|
||||
@ -1199,7 +1183,7 @@ gtk_theming_engine_render_icon_pixbuf (GtkThemingEngine *engine,
|
||||
const GtkIconSource *source,
|
||||
GtkIconSize size)
|
||||
{
|
||||
return gtk_do_render_icon_pixbuf (engine->priv->context, source, size);
|
||||
return gtk_render_icon_pixbuf (engine->priv->context, source, size);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1209,7 +1193,7 @@ gtk_theming_engine_render_icon (GtkThemingEngine *engine,
|
||||
gdouble x,
|
||||
gdouble y)
|
||||
{
|
||||
gtk_do_render_icon (engine->priv->context, cr, pixbuf, x, y);
|
||||
gtk_render_icon (engine->priv->context, cr, pixbuf, x, y);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1219,7 +1203,7 @@ gtk_theming_engine_render_icon_surface (GtkThemingEngine *engine,
|
||||
gdouble x,
|
||||
gdouble y)
|
||||
{
|
||||
gtk_do_render_icon_surface (engine->priv->context, cr, surface, x, y);
|
||||
gtk_render_icon_surface (engine->priv->context, cr, surface, x, y);
|
||||
}
|
||||
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
@ -1,32 +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_PRIVATE_H__
|
||||
#define __GTK_THEMING_ENGINE_PRIVATE_H__
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include "gtk/deprecated/gtkthemingengine.h"
|
||||
#include "gtk/gtkcssvalueprivate.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
void _gtk_theming_engine_set_context (GtkThemingEngine *engine,
|
||||
GtkStyleContext *context);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_THEMING_ENGINE_PRIVATE_H__ */
|
@ -83,7 +83,7 @@ render_icon_image (GtkStyleContext *context,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gtk_do_render_check (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
@ -240,7 +240,7 @@ gtk_render_check (GtkStyleContext *context,
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gtk_do_render_option (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
@ -389,7 +389,7 @@ gtk_render_option (GtkStyleContext *context,
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gtk_do_render_arrow (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble angle,
|
||||
@ -486,7 +486,7 @@ color_shade (const GdkRGBA *color,
|
||||
_gdk_rgba_init_from_hsla (color_return, &hsla);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gtk_do_render_background (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
@ -932,7 +932,7 @@ render_frame_internal (GtkStyleContext *context,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gtk_do_render_frame (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
@ -989,7 +989,7 @@ gtk_render_frame (GtkStyleContext *context,
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gtk_do_render_expander (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
@ -1141,7 +1141,7 @@ gtk_render_expander (GtkStyleContext *context,
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gtk_do_render_focus (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
@ -1242,7 +1242,7 @@ prepare_context_for_layout (cairo_t *cr,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gtk_do_render_layout (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
@ -1298,7 +1298,7 @@ gtk_render_layout (GtkStyleContext *context,
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gtk_do_render_line (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x0,
|
||||
@ -1358,7 +1358,7 @@ gtk_render_line (GtkStyleContext *context,
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gtk_do_render_slider (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
@ -1414,7 +1414,7 @@ gtk_render_slider (GtkStyleContext *context,
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gtk_do_render_frame_gap (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
@ -1573,7 +1573,7 @@ gtk_render_frame_gap (GtkStyleContext *context,
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gtk_do_render_extension (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
@ -1716,7 +1716,7 @@ add_path_line (cairo_t *cr,
|
||||
cairo_line_to (cr, x2, y2);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gtk_do_render_handle (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
@ -2144,7 +2144,7 @@ render_spinner (GtkStyleContext *context,
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gtk_do_render_activity (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
@ -2229,7 +2229,7 @@ scale_or_ref (GdkPixbuf *src,
|
||||
GDK_INTERP_BILINEAR);
|
||||
}
|
||||
|
||||
GdkPixbuf *
|
||||
static GdkPixbuf *
|
||||
gtk_do_render_icon_pixbuf (GtkStyleContext *context,
|
||||
const GtkIconSource *source,
|
||||
GtkIconSize size)
|
||||
@ -2353,7 +2353,7 @@ gtk_render_icon_pixbuf (GtkStyleContext *context,
|
||||
return gtk_do_render_icon_pixbuf (context, source, size);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gtk_do_render_icon (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
GdkPixbuf *pixbuf,
|
||||
@ -2401,7 +2401,7 @@ gtk_render_icon (GtkStyleContext *context,
|
||||
cairo_restore (cr);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
gtk_do_render_icon_surface (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
cairo_surface_t *surface,
|
||||
|
@ -22,113 +22,8 @@
|
||||
#include <pango/pango.h>
|
||||
#include <gdk/gdk.h>
|
||||
|
||||
#include <gtk/gtkenums.h>
|
||||
#include <gtk/gtktypes.h>
|
||||
|
||||
void gtk_do_render_check (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
void gtk_do_render_option (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
void gtk_do_render_arrow (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble angle,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble size);
|
||||
void gtk_do_render_background (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
void gtk_do_render_frame (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
void gtk_do_render_expander (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
void gtk_do_render_focus (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
void gtk_do_render_layout (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
PangoLayout *layout);
|
||||
void gtk_do_render_line (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x0,
|
||||
gdouble y0,
|
||||
gdouble x1,
|
||||
gdouble y1);
|
||||
void gtk_do_render_slider (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height,
|
||||
GtkOrientation orientation);
|
||||
void gtk_do_render_frame_gap (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height,
|
||||
GtkPositionType gap_side,
|
||||
gdouble xy0_gap,
|
||||
gdouble xy1_gap);
|
||||
void gtk_do_render_extension(GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height,
|
||||
GtkPositionType gap_side);
|
||||
void gtk_do_render_handle (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
void gtk_do_render_activity (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
gdouble width,
|
||||
gdouble height);
|
||||
GdkPixbuf * gtk_do_render_icon_pixbuf (GtkStyleContext *context,
|
||||
const GtkIconSource *source,
|
||||
GtkIconSize size);
|
||||
void gtk_do_render_icon (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
GdkPixbuf *pixbuf,
|
||||
gdouble x,
|
||||
gdouble y);
|
||||
void gtk_do_render_icon_surface (GtkStyleContext *context,
|
||||
cairo_t *cr,
|
||||
cairo_surface_t *surface,
|
||||
gdouble x,
|
||||
gdouble y);
|
||||
|
||||
void gtk_render_paint_spinner (cairo_t *cr,
|
||||
gdouble radius,
|
||||
gdouble progress);
|
||||
gdouble radius,
|
||||
gdouble progress);
|
||||
|
||||
#endif /* __GTK_RENDER_PRIVATE_H__ */
|
||||
|
@ -46,7 +46,6 @@
|
||||
#include "gtksettings.h"
|
||||
#include "gtksettingsprivate.h"
|
||||
|
||||
#include "deprecated/gtkthemingengineprivate.h"
|
||||
#include "deprecated/gtkgradientprivate.h"
|
||||
#include "deprecated/gtksymboliccolorprivate.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user