themingengine: Move actual render functions to gtkrender.c

GtkThemingEngine just always calls
  gtk_do_render_foo(engine->priv->context, ...)
now. Other than that, the code is unchanged.
This commit is contained in:
Benjamin Otte 2014-06-16 04:18:51 +02:00
parent d3c147a62d
commit 23948d6a3a
8 changed files with 1929 additions and 1627 deletions

View File

@ -638,6 +638,7 @@ gtk_private_h_sources = \
gtkrecentchooserdefault.h \
gtkrecentchooserprivate.h \
gtkrecentchooserutils.h \
gtkrenderprivate.h \
gtkresources.h \
gtkroundedboxprivate.h \
gtkscaleprivate.h \

File diff suppressed because it is too large Load Diff

View File

@ -24,9 +24,6 @@
G_BEGIN_DECLS
void _gtk_theming_engine_paint_spinner (cairo_t *cr,
gdouble radius,
gdouble progress);
void _gtk_theming_engine_set_context (GtkThemingEngine *engine,
GtkStyleContext *context);

View File

@ -29,6 +29,7 @@
#include "gtkcssimagevalueprivate.h"
#include "gtkcssnumbervalueprivate.h"
#include "gtkcssrepeatvalueprivate.h"
#include "gtkstylepropertyprivate.h"
#include "gtkstylepropertiesprivate.h"
/* this is in case round() is not provided by the compiler,

View File

@ -26,10 +26,9 @@
#include "gtkcssnumbervalueprivate.h"
#include "gtkcssrgbavalueprivate.h"
#include "gtkstylecontextprivate.h"
#include "gtkrenderprivate.h"
#include "gtkpango.h"
#include "deprecated/gtkthemingengineprivate.h"
#include <math.h>
struct _GtkCssValue {
@ -457,7 +456,7 @@ _gtk_css_shadow_value_paint_spinner (const GtkCssValue *shadow,
cairo_translate (cr,
_gtk_css_number_value_get (shadow->hoffset, 0),
_gtk_css_number_value_get (shadow->voffset, 0));
_gtk_theming_engine_paint_spinner (cr, radius, progress);
gtk_render_paint_spinner (cr, radius, progress);
cr = gtk_css_shadow_value_finish_drawing (shadow, cr);

File diff suppressed because it is too large Load Diff

134
gtk/gtkrenderprivate.h Normal file
View File

@ -0,0 +1,134 @@
/* 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_RENDER_PRIVATE_H__
#define __GTK_RENDER_PRIVATE_H__
#include <cairo.h>
#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);
#endif /* __GTK_RENDER_PRIVATE_H__ */

View File

@ -51,9 +51,9 @@ void _gtk_rounded_box_apply_border_radius_for_context (GtkRoundedBox
GtkStyleContext *context,
GtkJunctionSides junction);
void _gtk_rounded_box_apply_outline_radius_for_context (GtkRoundedBox *box,
GtkStyleContext *context,
GtkJunctionSides junction);
void _gtk_rounded_box_apply_outline_radius_for_context (GtkRoundedBox *box,
GtkStyleContext *context,
GtkJunctionSides junction);
void _gtk_rounded_box_grow (GtkRoundedBox *box,
double top,