44 lines
894 B
C
44 lines
894 B
C
#ifdef HAVE_CONFIG_H
|
|
# include <config.h>
|
|
#endif
|
|
|
|
#ifdef HASRUBY
|
|
#ifndef __GM_SCRIPT_H__
|
|
#define __GM_SCRIPT_H__
|
|
|
|
#include <gtk/gtk.h>
|
|
#include "gm-world.h"
|
|
|
|
enum GmScriptType {
|
|
ST_USER,
|
|
ST_SHARE
|
|
};
|
|
|
|
typedef struct _GmScriptFunction {
|
|
enum scriptType type;
|
|
gchar *name;
|
|
gchar *fname;
|
|
gchar *filename;
|
|
gchar *description;
|
|
} GmScriptFunction;
|
|
|
|
typedef struct _GmScriptInfo {
|
|
gchar *name;
|
|
gchar *argstr;
|
|
} GmScriptInfo;
|
|
|
|
void gm_script_init();
|
|
void gm_script_fini();
|
|
void gm_script_flush_and_reload();
|
|
void gm_script_reload_file(const gchar *uri);
|
|
gboolean gm_script_add_file(const gchar *uri);
|
|
void gm_script_remove_file(const gchar *uri);
|
|
|
|
GmScriptFunction *gm_script_find(gchar *name);
|
|
gboolean gm_script_run(GmWorld *world, GmScriptFunction *f, gchar *argstr);
|
|
|
|
GList *script_get_scripts();
|
|
GList *script_get_files();
|
|
|
|
#endif /* __GM_SCRIPT_H__ */
|
|
#endif
|