libfprint/SOURCES/0080-gtk-demo-Use-G_DECLARE-to-avoid-missing-declarations.patch

54 lines
1.5 KiB
Diff
Raw Normal View History

2020-04-23 23:55:43 +00:00
From 8f2c0ada0e2e8813f8c7da3fba9c110ec49c614e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Wed, 4 Dec 2019 14:04:04 +0100
Subject: [PATCH 080/181] gtk-demo: Use G_DECLARE to avoid missing declarations
---
demo/gtk-libfprint-test.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/demo/gtk-libfprint-test.c b/demo/gtk-libfprint-test.c
index c6dd90e..8026815 100644
--- a/demo/gtk-libfprint-test.c
+++ b/demo/gtk-libfprint-test.c
@@ -22,9 +22,11 @@
#include <gtk/gtk.h>
#include <libfprint/fprint.h>
-typedef GtkApplication LibfprintDemo;
-typedef GtkApplicationClass LibfprintDemoClass;
-
+struct _LibfprintDemo
+{
+ GtkApplication parent;
+};
+G_DECLARE_FINAL_TYPE (LibfprintDemo, libfprint_demo, FP, DEMO, GtkApplication)
G_DEFINE_TYPE (LibfprintDemo, libfprint_demo, GTK_TYPE_APPLICATION)
typedef enum {
@@ -33,7 +35,7 @@ typedef enum {
IMAGE_DISPLAY_BINARY = 1 << 1
} ImageDisplayFlags;
-typedef struct
+struct _LibfprintDemoWindow
{
GtkApplicationWindow parent_instance;
@@ -52,10 +54,9 @@ typedef struct
FpImage *img;
ImageDisplayFlags img_flags;
-} LibfprintDemoWindow;
-
-typedef GtkApplicationWindowClass LibfprintDemoWindowClass;
+};
+G_DECLARE_FINAL_TYPE (LibfprintDemoWindow, libfprint_demo_window, FP, DEMO_WINDOW, GtkApplicationWindow)
G_DEFINE_TYPE (LibfprintDemoWindow, libfprint_demo_window, GTK_TYPE_APPLICATION_WINDOW)
typedef enum {
--
2.24.1