[gtk/deprecate-render: 28/54] Deprecate gtk_render apis
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/deprecate-render: 28/54] Deprecate gtk_render apis
- Date: Mon, 10 Oct 2022 03:39:46 +0000 (UTC)
commit 3fe779b26161cacc39586ec6b07c71b9f785cb27
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Oct 7 23:35:07 2022 -0400
Deprecate gtk_render apis
These take a GtkStyleContext as argument, and we
want to get rid of GtkStyleContext eventually.
The proper drawing api these days is gtk_snapshot.
gtk/{ => deprecated}/gtkrender.c | 25 +++++++++++++++++++++++++
gtk/{ => deprecated}/gtkrender.h | 24 ++++++++++++------------
gtk/deprecated/meson.build | 2 ++
gtk/gtk.h | 2 +-
gtk/meson.build | 2 --
5 files changed, 40 insertions(+), 15 deletions(-)
---
diff --git a/gtk/gtkrender.c b/gtk/deprecated/gtkrender.c
similarity index 97%
rename from gtk/gtkrender.c
rename to gtk/deprecated/gtkrender.c
index 414b940517..0afc1df189 100644
--- a/gtk/gtkrender.c
+++ b/gtk/deprecated/gtkrender.c
@@ -33,6 +33,8 @@
#include "gsk/gskroundedrectprivate.h"
#include <gdk/gdktextureprivate.h>
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+
static void
gtk_do_render_icon (GtkStyleContext *context,
cairo_t *cr,
@@ -76,6 +78,8 @@ gtk_do_render_icon (GtkStyleContext *context,
* Typical checkmark rendering:
*
* ![](checks.png)
+ *
+ * Deprecated: 4.10
**/
void
gtk_render_check (GtkStyleContext *context,
@@ -110,6 +114,8 @@ gtk_render_check (GtkStyleContext *context,
* Typical option mark rendering:
*
* ![](options.png)
+ *
+ * Deprecated: 4.10
**/
void
gtk_render_option (GtkStyleContext *context,
@@ -142,6 +148,8 @@ gtk_render_option (GtkStyleContext *context,
* Typical arrow rendering at 0, 1⁄2 π;, π; and 3⁄2 π:
*
* ![](arrows.png)
+ *
+ * Deprecated: 4.10
**/
void
gtk_render_arrow (GtkStyleContext *context,
@@ -175,6 +183,8 @@ gtk_render_arrow (GtkStyleContext *context,
* `background-image`, `border-width` and `border-radius`:
*
* ![](background.png)
+ *
+ * Deprecated: 4.10
**/
void
gtk_render_background (GtkStyleContext *context,
@@ -221,6 +231,8 @@ gtk_render_background (GtkStyleContext *context,
* `border-color`, `border-width`, `border-radius` and junctions:
*
* ![](frames.png)
+ *
+ * Deprecated: 4.10
**/
void
gtk_render_frame (GtkStyleContext *context,
@@ -268,6 +280,8 @@ gtk_render_frame (GtkStyleContext *context,
* Typical expander rendering:
*
* ![](expanders.png)
+ *
+ * Deprecated: 4.10
**/
void
gtk_render_expander (GtkStyleContext *context,
@@ -300,6 +314,8 @@ gtk_render_expander (GtkStyleContext *context,
* Typical focus rendering:
*
* ![](focus.png)
+ *
+ * Deprecated: 4.10
**/
void
gtk_render_focus (GtkStyleContext *context,
@@ -340,6 +356,8 @@ gtk_render_focus (GtkStyleContext *context,
* @layout: the `PangoLayout` to render
*
* Renders @layout on the coordinates @x, @y
+ *
+ * Deprecated: 4.10
**/
void
gtk_render_layout (GtkStyleContext *context,
@@ -378,6 +396,8 @@ gtk_render_layout (GtkStyleContext *context,
* @y1: Y coordinate for the end of the line
*
* Renders a line from (x0, y0) to (x1, y1).
+ *
+ * Deprecated: 4.10
**/
void
gtk_render_line (GtkStyleContext *context,
@@ -423,6 +443,8 @@ gtk_render_line (GtkStyleContext *context,
* Handles rendered for the paned and grip classes:
*
* ![](handles.png)
+ *
+ * Deprecated: 4.10
**/
void
gtk_render_handle (GtkStyleContext *context,
@@ -456,6 +478,8 @@ gtk_render_handle (GtkStyleContext *context,
* Renders an activity indicator (such as in `GtkSpinner`).
* The state %GTK_STATE_FLAG_CHECKED determines whether there is
* activity going on.
+ *
+ * Deprecated: 4.10
**/
void
gtk_render_activity (GtkStyleContext *context,
@@ -488,6 +512,7 @@ gtk_render_activity (GtkStyleContext *context,
* regardless of scaling factors, which may not be appropriate when
* drawing on displays with high pixel densities.
*
+ * Deprecated: 4.10
**/
void
gtk_render_icon (GtkStyleContext *context,
diff --git a/gtk/gtkrender.h b/gtk/deprecated/gtkrender.h
similarity index 95%
rename from gtk/gtkrender.h
rename to gtk/deprecated/gtkrender.h
index 2d70770ece..27fa4847eb 100644
--- a/gtk/gtkrender.h
+++ b/gtk/deprecated/gtkrender.h
@@ -31,28 +31,28 @@
G_BEGIN_DECLS
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
void gtk_render_check (GtkStyleContext *context,
cairo_t *cr,
double x,
double y,
double width,
double height);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
void gtk_render_option (GtkStyleContext *context,
cairo_t *cr,
double x,
double y,
double width,
double height);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
void gtk_render_arrow (GtkStyleContext *context,
cairo_t *cr,
double angle,
double x,
double y,
double size);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
void gtk_render_background (GtkStyleContext *context,
cairo_t *cr,
double x,
@@ -60,55 +60,55 @@ void gtk_render_background (GtkStyleContext *context,
double width,
double height);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
void gtk_render_frame (GtkStyleContext *context,
cairo_t *cr,
double x,
double y,
double width,
double height);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
void gtk_render_expander (GtkStyleContext *context,
cairo_t *cr,
double x,
double y,
double width,
double height);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
void gtk_render_focus (GtkStyleContext *context,
cairo_t *cr,
double x,
double y,
double width,
double height);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
void gtk_render_layout (GtkStyleContext *context,
cairo_t *cr,
double x,
double y,
PangoLayout *layout);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
void gtk_render_line (GtkStyleContext *context,
cairo_t *cr,
double x0,
double y0,
double x1,
double y1);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
void gtk_render_handle (GtkStyleContext *context,
cairo_t *cr,
double x,
double y,
double width,
double height);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
void gtk_render_activity (GtkStyleContext *context,
cairo_t *cr,
double x,
double y,
double width,
double height);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_4_10
void gtk_render_icon (GtkStyleContext *context,
cairo_t *cr,
GdkTexture *texture,
diff --git a/gtk/deprecated/meson.build b/gtk/deprecated/meson.build
index 655bd4b10e..f6f90dd64b 100644
--- a/gtk/deprecated/meson.build
+++ b/gtk/deprecated/meson.build
@@ -24,6 +24,7 @@ gtk_deprecated_sources = [
'deprecated/gtkentrycompletion.c',
'deprecated/gtkiconview.c',
'deprecated/gtkliststore.c',
+ 'deprecated/gtkrender.c',
'deprecated/gtktreedatalist.c',
'deprecated/gtktreednd.c',
'deprecated/gtktreemodel.c',
@@ -63,6 +64,7 @@ gtk_deprecated_headers = [
'deprecated/gtkentrycompletion.h',
'deprecated/gtkiconview.h',
'deprecated/gtkliststore.h',
+ 'deprecated/gtkrender.h',
'deprecated/gtktreednd.h',
'deprecated/gtktreemodel.h',
'deprecated/gtktreemodelfilter.h',
diff --git a/gtk/gtk.h b/gtk/gtk.h
index d4a4b166d1..0bbc5455c4 100644
--- a/gtk/gtk.h
+++ b/gtk/gtk.h
@@ -205,7 +205,7 @@
#include <gtk/gtkprogressbar.h>
#include <gtk/gtkrange.h>
#include <gtk/gtkrecentmanager.h>
-#include <gtk/gtkrender.h>
+#include <gtk/deprecated/gtkrender.h>
#include <gtk/gtkrevealer.h>
#include <gtk/gtkroot.h>
#include <gtk/gtkscale.h>
diff --git a/gtk/meson.build b/gtk/meson.build
index b479cf6f4c..cbde78d38a 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -313,7 +313,6 @@ gtk_public_sources = files([
'gtkpropertylookuplistmodel.c',
'gtkrange.c',
'gtkrecentmanager.c',
- 'gtkrender.c',
'gtkrenderbackground.c',
'gtkrenderborder.c',
'gtkrendericon.c',
@@ -561,7 +560,6 @@ gtk_public_headers = files([
'gtkprogressbar.h',
'gtkrange.h',
'gtkrecentmanager.h',
- 'gtkrender.h',
'gtkrevealer.h',
'gtkroot.h',
'gtkscale.h',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]