[gtk+/wip/otte/shader: 5/9] gsksl: Add gsksltypesprivate.h



commit 2bb1b2ca14ee9471ce48f95635ac7d5eb05c89d2
Author: Benjamin Otte <otte redhat com>
Date:   Sat Sep 16 21:33:34 2017 +0200

    gsksl: Add gsksltypesprivate.h
    
    All those types are recursively needing each other in their functions,
    so add a generic header for all those types and only include that
    header.

 gsk/gskslnode.c               |    1 +
 gsk/gskslnodeprivate.h        |    3 ++-
 gsk/gsksltokenstream.c        |    2 ++
 gsk/gsksltokenstreamprivate.h |    5 +----
 gsk/gsksltype.c               |    3 +++
 gsk/gsksltypeprivate.h        |    2 +-
 gsk/gsksltypesprivate.h       |   28 ++++++++++++++++++++++++++++
 7 files changed, 38 insertions(+), 6 deletions(-)
---
diff --git a/gsk/gskslnode.c b/gsk/gskslnode.c
index cef5bbf..a552d68 100644
--- a/gsk/gskslnode.c
+++ b/gsk/gskslnode.c
@@ -21,6 +21,7 @@
 #include "gskslnodeprivate.h"
 
 #include "gsksltokenstreamprivate.h"
+#include "gsksltokenizerprivate.h"
 #include "gsksltypeprivate.h"
 
 #include <string.h>
diff --git a/gsk/gskslnodeprivate.h b/gsk/gskslnodeprivate.h
index 776f59c..9066d8f 100644
--- a/gsk/gskslnodeprivate.h
+++ b/gsk/gskslnodeprivate.h
@@ -21,9 +21,10 @@
 
 #include <glib.h>
 
+#include "gsk/gsksltypesprivate.h"
+
 G_BEGIN_DECLS
 
-typedef struct _GskSlNode GskSlNode;
 typedef struct _GskSlNodeClass GskSlNodeClass;
 
 struct _GskSlNode {
diff --git a/gsk/gsksltokenstream.c b/gsk/gsksltokenstream.c
index 4c6365d..4e2e8b7 100644
--- a/gsk/gsksltokenstream.c
+++ b/gsk/gsksltokenstream.c
@@ -20,6 +20,8 @@
 
 #include "gsksltokenstreamprivate.h"
 
+#include "gsksltokenizerprivate.h"
+
 struct _GskSlTokenStream
 {
   int ref_count;
diff --git a/gsk/gsksltokenstreamprivate.h b/gsk/gsksltokenstreamprivate.h
index 0a07fe1..d665b54 100644
--- a/gsk/gsksltokenstreamprivate.h
+++ b/gsk/gsksltokenstreamprivate.h
@@ -21,13 +21,10 @@
 
 #include <glib.h>
 
-#include "gskslnodeprivate.h"
-#include "gsksltokenizerprivate.h"
+#include "gsksltypesprivate.h"
 
 G_BEGIN_DECLS
 
-typedef struct _GskSlTokenStream GskSlTokenStream;
-
 GskSlTokenStream *      gsk_sl_token_stream_new                 (GBytes              *source);
 
 GskSlTokenStream *      gsk_sl_token_stream_ref                 (GskSlTokenStream    *stream);
diff --git a/gsk/gsksltype.c b/gsk/gsksltype.c
index 5fd34d2..b978fe5 100644
--- a/gsk/gsksltype.c
+++ b/gsk/gsksltype.c
@@ -20,6 +20,9 @@
 
 #include "gsksltypeprivate.h"
 
+#include "gsksltokenizerprivate.h"
+#include "gsksltokenstreamprivate.h"
+
 #include <string.h>
 
 struct _GskSlType
diff --git a/gsk/gsksltypeprivate.h b/gsk/gsksltypeprivate.h
index 6893709..da4f0f3 100644
--- a/gsk/gsksltypeprivate.h
+++ b/gsk/gsksltypeprivate.h
@@ -21,7 +21,7 @@
 
 #include <glib.h>
 
-#include "gsksltokenstreamprivate.h"
+#include "gsksltypesprivate.h"
 
 G_BEGIN_DECLS
 
diff --git a/gsk/gsksltypesprivate.h b/gsk/gsksltypesprivate.h
new file mode 100644
index 0000000..979339a
--- /dev/null
+++ b/gsk/gsksltypesprivate.h
@@ -0,0 +1,28 @@
+/* GSK - The GTK Scene Kit
+ * Copyright 2016  Benjamin Otte
+ *
+ * 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 __GSK_SL_TYPES_H__
+#define __GSK_SL_TYPES_H__
+
+#include <gsk/gsktypes.h>
+
+typedef struct _GskSlNode               GskSlNode;
+typedef struct _GskSlToken              GskSlToken;
+typedef struct _GskSlTokenStream        GskSlTokenStream;
+typedef struct _GskSlType               GskSlType;
+
+#endif /* __GSK_SL_TYPES_H__ */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]