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.
This commit is contained in:
Benjamin Otte
2017-09-16 21:33:34 +02:00
parent 4e0def2806
commit da5417def4
7 changed files with 38 additions and 8 deletions

View File

@@ -21,6 +21,7 @@
#include "gskslnodeprivate.h"
#include "gskslpreprocessorprivate.h"
#include "gsksltokenizerprivate.h"
#include "gsksltypeprivate.h"
#include <string.h>

View File

@@ -21,9 +21,10 @@
#include <glib.h>
#include "gsk/gsksltypesprivate.h"
G_BEGIN_DECLS
typedef struct _GskSlNode GskSlNode;
typedef struct _GskSlNodeClass GskSlNodeClass;
struct _GskSlNode {

View File

@@ -20,6 +20,8 @@
#include "gskslpreprocessorprivate.h"
#include "gsksltokenizerprivate.h"
struct _GskSlPreprocessor
{
int ref_count;

View File

@@ -21,13 +21,10 @@
#include <glib.h>
#include "gskslnodeprivate.h"
#include "gsksltokenizerprivate.h"
#include "gsksltypesprivate.h"
G_BEGIN_DECLS
typedef struct _GskSlPreprocessor GskSlPreprocessor;
GskSlPreprocessor * gsk_sl_preprocessor_new (GBytes *source);
GskSlPreprocessor * gsk_sl_preprocessor_ref (GskSlPreprocessor *preproc);

View File

@@ -20,6 +20,9 @@
#include "gsksltypeprivate.h"
#include "gsksltokenizerprivate.h"
#include "gskslpreprocessorprivate.h"
#include <string.h>
struct _GskSlType

View File

@@ -21,7 +21,7 @@
#include <glib.h>
#include "gskslpreprocessorprivate.h"
#include "gsksltypesprivate.h"
G_BEGIN_DECLS
@@ -39,8 +39,6 @@ typedef enum {
GSK_SL_N_BUILTIN_TYPES
} GskSlBuiltinType;
typedef struct _GskSlType GskSlType;
GskSlType * gsk_sl_type_new_parse (GskSlPreprocessor *stream);
GskSlType * gsk_sl_type_get_builtin (GskSlBuiltinType builtin);

28
gsk/gsksltypesprivate.h Normal file
View File

@@ -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 _GskSlPreprocessor GskSlPreprocessor;
typedef struct _GskSlToken GskSlToken;
typedef struct _GskSlType GskSlType;
#endif /* __GSK_SL_TYPES_H__ */