mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
991562f536
Initial implementation of the UI definition files. (#424) * clutter/json/Makefile.am: * clutter/json/*.[ch]: In-tree copy of JSON-GLib, a GLib-based JSON parser/generator library. We use it in-tree because we might need to change the API. Ideally, we'd depend on it. * clutter/clutter.h: * clutter/clutter-script-private.h: * clutter/clutter-script.[ch]: ClutterScript, the scenegraph generator class. It parses JSON streams in form of buffers and files and builds the scene. * clutter/clutter-debug.h: * clutter/clutter-main.c: Add a "script" debug flag * clutter/Makefile.am: Build glue. * tests/Makefile.am: * tests/test-script.c: Add a test case for the ClutterScript. * configure.ac: Depend on GLib 2.14, so we can use the g_hash_table_get_key() and g_hash_table_get_values() functions for the time being; we can probably reimplement those, but we are going to need 2.14 anyway if we are going to implement a list model using GSequence.
62 lines
2.0 KiB
C
62 lines
2.0 KiB
C
#ifndef __CLUTTER_DEBUG_H__
|
|
#define __CLUTTER_DEBUG_H__
|
|
|
|
#include <glib.h>
|
|
#include "clutter-main.h"
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
typedef enum {
|
|
CLUTTER_DEBUG_MISC = 1 << 0,
|
|
CLUTTER_DEBUG_ACTOR = 1 << 1,
|
|
CLUTTER_DEBUG_TEXTURE = 1 << 2,
|
|
CLUTTER_DEBUG_EVENT = 1 << 3,
|
|
CLUTTER_DEBUG_PAINT = 1 << 4,
|
|
CLUTTER_DEBUG_GL = 1 << 5,
|
|
CLUTTER_DEBUG_ALPHA = 1 << 6,
|
|
CLUTTER_DEBUG_BEHAVIOUR = 1 << 7,
|
|
CLUTTER_DEBUG_PANGO = 1 << 8,
|
|
CLUTTER_DEBUG_BACKEND = 1 << 9,
|
|
CLUTTER_DEBUG_SCHEDULER = 1 << 10,
|
|
CLUTTER_DEBUG_SCRIPT = 1 << 11
|
|
} ClutterDebugFlag;
|
|
|
|
#ifdef CLUTTER_ENABLE_DEBUG
|
|
|
|
#define CLUTTER_NOTE(type,x,a...) G_STMT_START { \
|
|
if (clutter_debug_flags & CLUTTER_DEBUG_##type) \
|
|
{ g_message ("[" #type "] " G_STRLOC ": " x, ##a); } \
|
|
} G_STMT_END
|
|
|
|
#define CLUTTER_MARK() CLUTTER_NOTE(MISC, "== mark ==")
|
|
#define CLUTTER_DBG(x) { a }
|
|
|
|
#define CLUTTER_GLERR() G_STMT_START { \
|
|
if (clutter_debug_flags & CLUTTER_DEBUG_GL) \
|
|
{ GLenum _err = glGetError (); /* roundtrip */ \
|
|
if (_err != GL_NO_ERROR) \
|
|
g_warning (G_STRLOC ": GL Error %x", _err); \
|
|
} } G_STMT_END
|
|
|
|
#define CLUTTER_TIMESTAMP(type,x,a...) G_STMT_START { \
|
|
if (clutter_debug_flags & CLUTTER_DEBUG_##type) \
|
|
{ g_message ("[" #type "]" " %li:" G_STRLOC ": " \
|
|
x, clutter_get_timestamp(), ##a); } \
|
|
} G_STMT_END
|
|
|
|
#else /* !CLUTTER_ENABLE_DEBUG */
|
|
|
|
#define CLUTTER_NOTE(type,x,a...)
|
|
#define CLUTTER_MARK()
|
|
#define CLUTTER_DBG(x)
|
|
#define CLUTTER_GLERR()
|
|
#define CLUTTER_TIMESTAMP(type,x,a...)
|
|
|
|
#endif /* CLUTTER_ENABLE_DEBUG */
|
|
|
|
extern guint clutter_debug_flags;
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __CLUTTER_DEBUG_H__ */
|