summaryrefslogtreecommitdiff
path: root/src/ld-lua.h
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2010-09-25 16:55:07 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2010-10-17 14:05:53 +0200
commit23a1f25130ebe17a4bf7939487942e950195e33f (patch)
tree445f11e5bbe87e48922b0d9523cce864467be465 /src/ld-lua.h
parentc0ec389b597b5132e7db26eca3fff41fd87c0f7e (diff)
downloadlogdiag-23a1f25130ebe17a4bf7939487942e950195e33f.tar.gz
logdiag-23a1f25130ebe17a4bf7939487942e950195e33f.tar.xz
logdiag-23a1f25130ebe17a4bf7939487942e950195e33f.zip
Created LdLua class.
Diffstat (limited to 'src/ld-lua.h')
-rw-r--r--src/ld-lua.h46
1 files changed, 41 insertions, 5 deletions
diff --git a/src/ld-lua.h b/src/ld-lua.h
index 2c41579..512143e 100644
--- a/src/ld-lua.h
+++ b/src/ld-lua.h
@@ -14,11 +14,47 @@
G_BEGIN_DECLS
-lua_State *
-ld_lua_init (void);
-
-void
-ld_lua_destroy (lua_State *L);
+#define LD_TYPE_LUA (ld_lua_get_type ())
+#define LD_LUA(obj) (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), LD_TYPE_LUA, LdLua))
+#define LD_LUA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST \
+ ((klass), LD_TYPE_LUA, LdLuaClass))
+#define LD_IS_LUA(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), LD_TYPE_LUA))
+#define LD_IS_LUA_CLASS(klass) (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((klass), LD_TYPE_LUA))
+#define LD_LUA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), LD_LUA, LdLuaClass))
+
+typedef struct _LdLua LdLua;
+typedef struct _LdLuaPrivate LdLuaPrivate;
+typedef struct _LdLuaClass LdLuaClass;
+
+
+struct _LdLua
+{
+/*< private >*/
+ GObject parent_instance;
+ LdLuaPrivate *priv;
+
+/*< public >*/
+ gchar *name;
+};
+
+/* TODO: A virtual superclass, so other engines can be used. */
+struct _LdLuaClass
+{
+ GObjectClass parent_class;
+};
+
+
+GType ld_lua_get_type (void) G_GNUC_CONST;
+
+LdLua *ld_lua_new (void);
+/* TODO: Implement the following: */
+gboolean ld_lua_check_file (LdLua *lua, const gchar *filename);
+gboolean ld_lua_load_file_to_category (LdLua *lua, const gchar *filename,
+ LdSymbolCategory *category);
G_END_DECLS