2005-06-22 18:20:32 +00:00
|
|
|
/*
|
2005-10-13 14:08:18 +00:00
|
|
|
* mooapp.h
|
2005-06-22 18:20:32 +00:00
|
|
|
*
|
2007-05-20 04:42:10 -05:00
|
|
|
* Copyright (C) 2004-2007 by Yevgen Muntyan <muntyan@math.tamu.edu>
|
2005-06-22 18:20:32 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* See COPYING file that comes with this distribution.
|
|
|
|
*/
|
|
|
|
|
2007-05-20 04:42:10 -05:00
|
|
|
#ifndef MOO_APP_H
|
|
|
|
#define MOO_APP_H
|
2005-06-22 18:20:32 +00:00
|
|
|
|
2005-10-13 14:08:18 +00:00
|
|
|
#include <mooedit/mooeditor.h>
|
2005-06-22 18:20:32 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
|
|
|
|
#define MOO_TYPE_APP_INFO (moo_app_info_get_type ())
|
2005-10-13 14:08:18 +00:00
|
|
|
#define MOO_TYPE_APP (moo_app_get_type ())
|
2005-06-22 18:20:32 +00:00
|
|
|
#define MOO_APP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), MOO_TYPE_APP, MooApp))
|
|
|
|
#define MOO_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MOO_TYPE_APP, MooAppClass))
|
|
|
|
#define MOO_IS_APP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), MOO_TYPE_APP))
|
|
|
|
#define MOO_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MOO_TYPE_APP))
|
|
|
|
#define MOO_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MOO_TYPE_APP, MooAppClass))
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _MooApp MooApp;
|
|
|
|
typedef struct _MooAppInfo MooAppInfo;
|
|
|
|
typedef struct _MooAppPrivate MooAppPrivate;
|
|
|
|
typedef struct _MooAppClass MooAppClass;
|
|
|
|
|
|
|
|
struct _MooAppInfo
|
|
|
|
{
|
|
|
|
char *short_name;
|
|
|
|
char *full_name;
|
|
|
|
char *description;
|
|
|
|
char *version;
|
|
|
|
char *website;
|
|
|
|
char *website_label;
|
2006-04-28 16:08:45 -05:00
|
|
|
char *logo;
|
2006-08-01 04:57:26 -05:00
|
|
|
char *credits;
|
2005-06-22 18:20:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _MooApp
|
|
|
|
{
|
|
|
|
GObject parent;
|
|
|
|
MooAppPrivate *priv;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _MooAppClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
|
|
|
|
2005-10-13 14:08:18 +00:00
|
|
|
gboolean (*init) (MooApp *app);
|
|
|
|
int (*run) (MooApp *app);
|
|
|
|
void (*quit) (MooApp *app);
|
|
|
|
|
|
|
|
gboolean (*try_quit) (MooApp *app);
|
2005-06-22 18:20:32 +00:00
|
|
|
|
2005-10-13 14:08:18 +00:00
|
|
|
GtkWidget* (*prefs_dialog) (MooApp *app);
|
2005-06-22 18:20:32 +00:00
|
|
|
|
2005-10-13 14:08:18 +00:00
|
|
|
void (*exec_cmd) (MooApp *app,
|
|
|
|
char cmd,
|
|
|
|
const char *data,
|
|
|
|
guint len);
|
2005-06-22 18:20:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
GType moo_app_get_type (void) G_GNUC_CONST;
|
|
|
|
GType moo_app_info_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
MooApp *moo_app_get_instance (void);
|
|
|
|
|
2005-11-23 11:10:03 +00:00
|
|
|
gboolean moo_app_init (MooApp *app);
|
2005-06-22 18:20:32 +00:00
|
|
|
int moo_app_run (MooApp *app);
|
|
|
|
gboolean moo_app_quit (MooApp *app);
|
|
|
|
|
|
|
|
void moo_app_set_exit_code (MooApp *app,
|
|
|
|
int code);
|
|
|
|
|
|
|
|
const MooAppInfo*moo_app_get_info (MooApp *app);
|
|
|
|
|
2006-06-01 13:50:37 -05:00
|
|
|
char *moo_app_create_user_data_dir (MooApp *app);
|
2005-06-22 18:20:32 +00:00
|
|
|
const char *moo_app_get_input_pipe_name (MooApp *app);
|
2006-05-14 18:43:39 -05:00
|
|
|
|
2005-06-22 18:20:32 +00:00
|
|
|
MooEditor *moo_app_get_editor (MooApp *app);
|
2005-10-13 14:08:18 +00:00
|
|
|
|
2005-06-22 18:20:32 +00:00
|
|
|
void moo_app_prefs_dialog (GtkWidget *parent);
|
|
|
|
void moo_app_about_dialog (GtkWidget *parent);
|
|
|
|
|
2006-12-10 16:47:48 -06:00
|
|
|
void moo_app_system_info_dialog (GtkWidget *parent);
|
|
|
|
char *moo_app_get_system_info (MooApp *app);
|
|
|
|
|
2005-06-22 18:20:32 +00:00
|
|
|
MooUIXML *moo_app_get_ui_xml (MooApp *app);
|
|
|
|
void moo_app_set_ui_xml (MooApp *app,
|
|
|
|
MooUIXML *xml);
|
|
|
|
|
2005-11-02 02:32:07 +00:00
|
|
|
char *moo_app_tempnam (MooApp *app);
|
|
|
|
|
|
|
|
gboolean moo_app_send_msg (MooApp *app,
|
2006-08-18 02:24:18 -05:00
|
|
|
const char *pid,
|
2005-11-02 02:32:07 +00:00
|
|
|
const char *data,
|
|
|
|
int len);
|
2006-06-03 02:37:54 -05:00
|
|
|
gboolean moo_app_send_files (MooApp *app,
|
2006-07-05 14:15:43 -05:00
|
|
|
char **files,
|
2006-09-26 14:43:56 -05:00
|
|
|
guint32 line,
|
2006-08-18 02:24:18 -05:00
|
|
|
guint32 stamp,
|
|
|
|
const char *pid);
|
2007-05-22 23:57:28 -05:00
|
|
|
void moo_app_open_files (MooApp *app,
|
|
|
|
char **files,
|
|
|
|
guint32 line,
|
|
|
|
guint32 stamp);
|
2005-11-02 02:32:07 +00:00
|
|
|
|
2006-05-27 00:40:03 -05:00
|
|
|
void moo_app_reload_python_plugins (void);
|
|
|
|
|
2005-06-22 18:20:32 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
2007-05-20 04:42:10 -05:00
|
|
|
#endif /* MOO_APP_H */
|