[gtk/deprecate-render] Deprecate gtk_render apis
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/deprecate-render] Deprecate gtk_render apis
- Date: Sat, 8 Oct 2022 03:41:59 +0000 (UTC)
commit 43709a8ee4b5dbf6373b4ad9077a366b5b2840fd
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/gtkflowbox.c | 2 +-
gtk/gtkglarea.c | 1 -
gtk/gtkpopover.c | 2 +-
gtk/meson.build | 2 --
8 files changed, 42 insertions(+), 18 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 96b38bb53d..c3d00452eb 100644
--- a/gtk/deprecated/meson.build
+++ b/gtk/deprecated/meson.build
@@ -4,6 +4,7 @@ gtk_deprecated_sources = [
'deprecated/gtkappchooserdialog.c',
'deprecated/gtkappchooserwidget.c',
'deprecated/gtkentrycompletion.c',
+ 'deprecated/gtkrender.c',
]
gtk_deprecated_headers = [
@@ -12,4 +13,5 @@ gtk_deprecated_headers = [
'deprecated/gtkappchooserdialog.h',
'deprecated/gtkappchooserwidget.h',
'deprecated/gtkentrycompletion.h',
+ 'deprecated/gtkrender.h',
]
diff --git a/gtk/gtk.h b/gtk/gtk.h
index 0451ad1591..932407d073 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/gtkflowbox.c b/gtk/gtkflowbox.c
index 16ae39cfb5..0e89711050 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -96,7 +96,7 @@
#include "gtkmarshalers.h"
#include "gtkorientable.h"
#include "gtkprivate.h"
-#include "gtkrender.h"
+#include "deprecated/gtkrender.h"
#include "gtksizerequest.h"
#include "gtksnapshot.h"
#include "gtkstylecontextprivate.h"
diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c
index 1806021be3..92016afe98 100644
--- a/gtk/gtkglarea.c
+++ b/gtk/gtkglarea.c
@@ -26,7 +26,6 @@
#include "gtkmarshalers.h"
#include "gtkmarshalers.h"
#include "gtkprivate.h"
-#include "gtkrender.h"
#include "gtksnapshot.h"
#include "gtknative.h"
#include "gtkwidgetprivate.h"
diff --git a/gtk/gtkpopover.c b/gtk/gtkpopover.c
index e74dcc2ae8..743a7f2640 100644
--- a/gtk/gtkpopover.c
+++ b/gtk/gtkpopover.c
@@ -125,7 +125,7 @@
#include "gtkcssboxesimplprivate.h"
#include "gtknativeprivate.h"
-#include "gtkrender.h"
+#include "deprecated/gtkrender.h"
#include "gtkstylecontextprivate.h"
#include "gtkroundedboxprivate.h"
#include "gsk/gskroundedrectprivate.h"
diff --git a/gtk/meson.build b/gtk/meson.build
index 69c3eb1228..b1fca7cf62 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -335,7 +335,6 @@ gtk_public_sources = files([
'gtkrange.c',
'gtktreerbtree.c',
'gtkrecentmanager.c',
- 'gtkrender.c',
'gtkrenderbackground.c',
'gtkrenderborder.c',
'gtkrendericon.c',
@@ -612,7 +611,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]