aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-11-18 02:02:42 (GMT)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-11-18 02:16:52 (GMT)
commit8eb7a321e697027df08e5d634bc6a53683ed913f (patch)
tree071c85aa6dce0605309076a2d7388db49346c63d
parentaec15c88446177b33b13efcf15ae70d9b1e5134e (diff)
callbacks: prepare to support gtk 4 render
The cairo way to draw pixmaps got removed on Gtk 3.94: https://gitlab.gnome.org/GNOME/gtk/commit/7ef8696a7dc2c7ad5965f7150acb51b1c0559a84 We'll likely need a different solution for it to work. So, for now, just print an error if someone tries to print with gtk versions above 3.90. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r--src/callbacks.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/callbacks.c b/src/callbacks.c
index d8e31fc..d2c9036 100644
--- a/src/callbacks.c
+++ b/src/callbacks.c
@@ -612,7 +612,7 @@ static void show_buffer(cam_t *cam)
frames++;
frames2++;
}
-#else
+#elif GTK_MAJOR_VERSION >= 3 && GTK_MINOR_VERSION < 94
/*
* GTK 3 way: use a drawing callback
*/
@@ -643,6 +643,15 @@ static inline void show_buffer(cam_t *cam)
{
gtk_widget_queue_draw(GTK_WIDGET(gtk_builder_get_object(cam->xml, "da")));
}
+#else /* TODO: add GTK 4 specific draw functions */
+void draw_callback(GtkWidget *widget, cairo_t *cr, cam_t *cam)
+{
+ #error "Can't draw yet with gtk > 3.94"
+}
+
+static inline void show_buffer(cam_t *cam)
+{
+}
#endif
/*

Privacy Policy