Commit d3c147a6 authored by Benjamin Otte's avatar Benjamin Otte

stylecontext: Split render functions out into gtkrender.[ch]

parent 763aa4db
......@@ -417,6 +417,7 @@ gtk_public_h_sources = \
gtkrecentchooserwidget.h \
gtkrecentfilter.h \
gtkrecentmanager.h \
gtkrender.h \
gtkrevealer.h \
gtkscale.h \
gtkscalebutton.h \
......@@ -1011,6 +1012,7 @@ gtk_base_c_sources = \
gtkrecentchooser.c \
gtkrecentfilter.c \
gtkrecentmanager.c \
gtkrender.c \
gtkresources.c \
gtkrevealer.c \
gtkroundedbox.c \
......
......@@ -33,6 +33,7 @@
#include "gtkinvisible.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtkrender.h"
#include "gtkwindow.h"
#include "gtktypebuiltins.h"
#include "gtkprivate.h"
......
......@@ -37,6 +37,7 @@
#include "gtkhsv.h"
#include "gtkbindings.h"
#include "gtkmarshalers.h"
#include "gtkrender.h"
#include "gtkstylecontext.h"
#include "gtktypebuiltins.h"
#include "gtkintl.h"
......
......@@ -44,6 +44,7 @@
#include "gtktypebuiltins.h"
#include "gtkstyle.h"
#include "gtkstylecontextprivate.h"
#include "gtkrender.h"
/**
* SECTION:gtkiconfactory
......
......@@ -41,7 +41,7 @@
#include "gtkiconfactory.h"
#include "gtkintl.h"
#include "gtkdebug.h"
#include "gtkspinner.h"
#include "gtkrender.h"
#include "gtkborder.h"
#include "gtkwidgetpath.h"
......
......@@ -26,6 +26,7 @@
#include "gtkmenu.h"
#include "gtkmenuitemprivate.h"
#include "gtkrender.h"
#include "gtkstylecontext.h"
#include "gtktearoffmenuitem.h"
#include "gtkintl.h"
......
......@@ -35,6 +35,7 @@
#include "gtktestutils.h"
#include "gtkdebug.h"
#include "gtktypebuiltins.h"
#include "gtkrender.h"
#define SYSTEM_TRAY_REQUEST_DOCK 0
#define SYSTEM_TRAY_BEGIN_MESSAGE 1
......
......@@ -166,6 +166,7 @@
#include <gtk/gtkrecentchooserwidget.h>
#include <gtk/gtkrecentfilter.h>
#include <gtk/gtkrecentmanager.h>
#include <gtk/gtkrender.h>
#include <gtk/gtkrevealer.h>
#include <gtk/gtkscale.h>
#include <gtk/gtkscalebutton.h>
......
......@@ -30,10 +30,11 @@
#include "gtkaccellabel.h"
#include "gtkaccelmap.h"
#include "gtkintl.h"
#include "gtkmain.h"
#include "gtksizerequest.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkrender.h"
#include "gtksizerequest.h"
/**
* SECTION:gtkaccellabel
......
......@@ -81,6 +81,7 @@
#include "gtkmarshalers.h"
#include "gtktooltip.h"
#include "gtkprivate.h"
#include "gtkrender.h"
#define TIMEOUT_INITIAL 500
#define TIMEOUT_REPEAT 50
......
......@@ -351,6 +351,7 @@
#include "gtkcellareacontext.h"
#include "gtkmarshalers.h"
#include "gtkprivate.h"
#include "gtkrender.h"
#include <gobject/gvaluecollector.h>
......
......@@ -27,9 +27,10 @@
#include <stdlib.h>
#include "gtkcellrendererprogress.h"
#include "gtkintl.h"
#include "gtkorientable.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkrender.h"
/**
......
......@@ -31,6 +31,7 @@
#include "gtkintl.h"
#include "gtkprivate.h"
#include "gtkrender.h"
#include "gtkwidgetprivate.h"
......
......@@ -32,13 +32,14 @@
#include "gtkcolorswatchprivate.h"
#include "gtkcolorutils.h"
#include "gtkgrid.h"
#include "gtkintl.h"
#include "gtkorientable.h"
#include "gtkentry.h"
#include "gtkoverlay.h"
#include "gtkadjustment.h"
#include "gtklabel.h"
#include "gtkrender.h"
#include "gtkspinbutton.h"
#include "gtkintl.h"
#include "gtkstylecontext.h"
#include <math.h>
......
......@@ -26,10 +26,10 @@
#include "gtkeventbox.h"
#include "gtksizerequest.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtkprivate.h"
#include "gtkrender.h"
#include "gtksizerequest.h"
/**
......
......@@ -23,6 +23,7 @@
#include "gtkgrid.h"
#include "gtkorientableprivate.h"
#include "gtkrender.h"
#include "gtksizerequest.h"
#include "gtkwidgetprivate.h"
#include "gtkprivate.h"
......
......@@ -45,6 +45,7 @@
#include "gtkintl.h"
#include "gtkprivate.h"
#include "gtkorientable.h"
#include "gtkrender.h"
#include "gtktypebuiltins.h"
#include "deprecated/gtkstock.h"
......
......@@ -43,6 +43,7 @@
#include "gtkmenuitemprivate.h"
#include "gtkmenuprivate.h"
#include "gtkmenushellprivate.h"
#include "gtkrender.h"
#include "gtksettings.h"
#include "gtksizerequest.h"
#include "gtkwindow.h"
......
......@@ -28,6 +28,7 @@
#include "gtkimage.h"
#include "gtklabel.h"
#include "gtkbox.h"
#include "gtkrender.h"
#include "gtkstylecontext.h"
#include "gtktypebuiltins.h"
......
This diff is collapsed.
/* 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_H__
#define __GTK_RENDER_H__
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gtk/gtk.h> can be included directly."
#endif
#include <cairo.h>
#include <pango/pango.h>
#include <gdk/gdk.h>
#include <gtk/gtkenums.h>
#include <gtk/gtktypes.h>
G_BEGIN_DECLS
GDK_AVAILABLE_IN_ALL
void gtk_render_check (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
GDK_AVAILABLE_IN_ALL
void gtk_render_option (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
GDK_AVAILABLE_IN_ALL
void gtk_render_arrow (GtkStyleContext *context,
cairo_t *cr,
gdouble angle,
gdouble x,
gdouble y,
gdouble size);
GDK_AVAILABLE_IN_ALL
void gtk_render_background (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
GDK_AVAILABLE_IN_ALL
void gtk_render_frame (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
GDK_AVAILABLE_IN_ALL
void gtk_render_expander (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
GDK_AVAILABLE_IN_ALL
void gtk_render_focus (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
GDK_AVAILABLE_IN_ALL
void gtk_render_layout (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
PangoLayout *layout);
GDK_AVAILABLE_IN_ALL
void gtk_render_line (GtkStyleContext *context,
cairo_t *cr,
gdouble x0,
gdouble y0,
gdouble x1,
gdouble y1);
GDK_AVAILABLE_IN_ALL
void gtk_render_slider (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height,
GtkOrientation orientation);
GDK_AVAILABLE_IN_ALL
void gtk_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);
GDK_AVAILABLE_IN_ALL
void gtk_render_extension (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height,
GtkPositionType gap_side);
GDK_AVAILABLE_IN_ALL
void gtk_render_handle (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
GDK_AVAILABLE_IN_ALL
void gtk_render_activity (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
GDK_DEPRECATED_IN_3_10_FOR(gtk_icon_theme_load_icon)
GdkPixbuf * gtk_render_icon_pixbuf (GtkStyleContext *context,
const GtkIconSource *source,
GtkIconSize size);
GDK_AVAILABLE_IN_3_2
void gtk_render_icon (GtkStyleContext *context,
cairo_t *cr,
GdkPixbuf *pixbuf,
gdouble x,
gdouble y);
GDK_AVAILABLE_IN_3_10
void gtk_render_icon_surface (GtkStyleContext *context,
cairo_t *cr,
cairo_surface_t *surface,
gdouble x,
gdouble y);
G_END_DECLS
#endif /* __GTK_RENDER_H__ */
......@@ -31,7 +31,7 @@
#include "gtkentryprivate.h"
#include "gtkintl.h"
#include "gtkprivate.h"
#include "gtkstylecontext.h"
#include "gtkrender.h"
#include "gtksearchbar.h"
/**
......
......@@ -24,10 +24,12 @@
#include "config.h"
#include "gtkorientableprivate.h"
#include "gtkseparator.h"
#include "gtkprivate.h"
#include "gtkorientableprivate.h"
#include "gtkintl.h"
#include "gtkprivate.h"
#include "gtkrender.h"
/**
* SECTION:gtkseparator
......
This diff is collapsed.
......@@ -1118,125 +1118,6 @@ GDK_AVAILABLE_IN_ALL
void gtk_style_context_set_background (GtkStyleContext *context,
GdkWindow *window);
/* Paint methods */
GDK_AVAILABLE_IN_ALL
void gtk_render_check (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
GDK_AVAILABLE_IN_ALL
void gtk_render_option (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
GDK_AVAILABLE_IN_ALL
void gtk_render_arrow (GtkStyleContext *context,
cairo_t *cr,
gdouble angle,
gdouble x,
gdouble y,
gdouble size);
GDK_AVAILABLE_IN_ALL
void gtk_render_background (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
GDK_AVAILABLE_IN_ALL
void gtk_render_frame (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
GDK_AVAILABLE_IN_ALL
void gtk_render_expander (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
GDK_AVAILABLE_IN_ALL
void gtk_render_focus (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
GDK_AVAILABLE_IN_ALL
void gtk_render_layout (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
PangoLayout *layout);
GDK_AVAILABLE_IN_ALL
void gtk_render_line (GtkStyleContext *context,
cairo_t *cr,
gdouble x0,
gdouble y0,
gdouble x1,
gdouble y1);
GDK_AVAILABLE_IN_ALL
void gtk_render_slider (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height,
GtkOrientation orientation);
GDK_AVAILABLE_IN_ALL
void gtk_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);
GDK_AVAILABLE_IN_ALL
void gtk_render_extension (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height,
GtkPositionType gap_side);
GDK_AVAILABLE_IN_ALL
void gtk_render_handle (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
GDK_AVAILABLE_IN_ALL
void gtk_render_activity (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
GDK_DEPRECATED_IN_3_10_FOR(gtk_icon_theme_load_icon)
GdkPixbuf * gtk_render_icon_pixbuf (GtkStyleContext *context,
const GtkIconSource *source,
GtkIconSize size);
GDK_AVAILABLE_IN_3_2
void gtk_render_icon (GtkStyleContext *context,
cairo_t *cr,
GdkPixbuf *pixbuf,
gdouble x,
gdouble y);
GDK_AVAILABLE_IN_3_10
void gtk_render_icon_surface (GtkStyleContext *context,
cairo_t *cr,
cairo_surface_t *surface,
gdouble x,
gdouble y);
GDK_AVAILABLE_IN_3_4
void gtk_render_insertion_cursor
(GtkStyleContext *context,
......
......@@ -37,22 +37,23 @@
#include "gtktoolbarprivate.h"
#include "gtkbindings.h"
#include "gtkbox.h"
#include "gtkcontainerprivate.h"
#include "gtkimage.h"
#include "gtkintl.h"
#include "gtklabel.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
#include "gtkmenu.h"
#include "gtkorientable.h"
#include "gtkorientableprivate.h"
#include "gtkprivate.h"
#include "gtkradiobutton.h"
#include "gtkradiotoolbutton.h"
#include "gtkrender.h"
#include "gtkseparatormenuitem.h"
#include "gtkseparatortoolitem.h"
#include "gtktoolshell.h"
#include "gtkbox.h"
#include "gtkprivate.h"
#include "gtkintl.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetpath.h"
#include "gtkwidgetprivate.h"
......
......@@ -32,6 +32,7 @@
#include "gtkpixelcacheprivate.h"
#include "gtkprivate.h"
#include "gtkscrollable.h"
#include "gtkrender.h"
#include "gtktypebuiltins.h"
#include "gtkwidgetprivate.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment