#define __COGL_MATRIX_H
#include <glib.h>
+#include "cogl-types.h"
G_BEGIN_DECLS
/* Note: we may want to extend this later with private flags
* and a cache of the inverse transform matrix. */
- float inv[16];
- unsigned long type;
- unsigned long flags;
- unsigned long _padding3;
+ float COGL_PRIVATE (inv)[16];
+ unsigned long COGL_PRIVATE (type);
+ unsigned long COGL_PRIVATE (flags);
+ unsigned long COGL_PRIVATE (_padding3);
};
/**
G_BEGIN_DECLS
+/* Some structures are meant to be opaque but they have public
+ definitions because we want the size to be public so they can be
+ allocated on the stack. This macro is used to ensure that users
+ don't accidentally access private members */
+#ifdef CLUTTER_COMPILATION
+#define COGL_PRIVATE(x) x
+#else
+#define COGL_PRIVATE(x) private_member_ ## x
+#endif
+
/**
* CoglHandle:
*
struct _CoglColor
{
/*< private >*/
- guint8 red;
- guint8 green;
- guint8 blue;
+ guint8 COGL_PRIVATE (red);
+ guint8 COGL_PRIVATE (green);
+ guint8 COGL_PRIVATE (blue);
- guint8 alpha;
+ guint8 COGL_PRIVATE (alpha);
/* padding in case we want to change to floats at
* some point */
- guint32 padding0;
- guint32 padding1;
- guint32 padding2;
+ guint32 COGL_PRIVATE (padding0);
+ guint32 COGL_PRIVATE (padding1);
+ guint32 COGL_PRIVATE (padding2);
};
/**