2005-06-22 18:20:32 +00:00
|
|
|
/*
|
2007-06-24 12:56:20 -05:00
|
|
|
* mooapp/mooapp.h
|
2005-06-22 18:20:32 +00:00
|
|
|
*
|
2010-12-21 20:15:45 -08:00
|
|
|
* Copyright (C) 2004-2010 by Yevgen Muntyan <emuntyan@users.sourceforge.net>
|
2005-06-22 18:20:32 +00:00
|
|
|
*
|
2008-09-05 17:20:50 -05:00
|
|
|
* This file is part of medit. medit is free software; you can
|
|
|
|
* redistribute it and/or modify it under the terms of the
|
|
|
|
* GNU Lesser General Public License as published by the
|
|
|
|
* Free Software Foundation; either version 2.1 of the License,
|
|
|
|
* or (at your option) any later version.
|
2005-06-22 18:20:32 +00:00
|
|
|
*
|
2008-09-05 17:20:50 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with medit. If not, see <http://www.gnu.org/licenses/>.
|
2005-06-22 18:20:32 +00:00
|
|
|
*/
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
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))
|
|
|
|
|
|
|
|
|
2010-12-08 01:25:34 -08:00
|
|
|
typedef struct _MooApp MooApp;
|
|
|
|
typedef struct _MooAppPrivate MooAppPrivate;
|
|
|
|
typedef struct _MooAppClass MooAppClass;
|
2005-06-22 18:20:32 +00:00
|
|
|
|
2010-12-08 01:25:34 -08:00
|
|
|
struct _MooApp
|
2005-06-22 18:20:32 +00:00
|
|
|
{
|
|
|
|
GObject parent;
|
|
|
|
MooAppPrivate *priv;
|
|
|
|
};
|
|
|
|
|
2010-12-08 01:25:34 -08:00
|
|
|
struct _MooAppClass
|
2005-06-22 18:20:32 +00:00
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
|
|
|
|
2007-06-24 12:16:36 -05:00
|
|
|
gboolean (*init) (MooApp *app);
|
|
|
|
int (*run) (MooApp *app);
|
|
|
|
void (*quit) (MooApp *app);
|
2005-10-13 14:08:18 +00:00
|
|
|
|
2007-06-24 12:16:36 -05:00
|
|
|
gboolean (*try_quit) (MooApp *app);
|
2005-06-22 18:20:32 +00:00
|
|
|
|
2007-06-24 12:16:36 -05:00
|
|
|
GtkWidget* (*prefs_dialog) (MooApp *app);
|
2005-06-22 18:20:32 +00:00
|
|
|
|
2007-06-24 12:16:36 -05:00
|
|
|
void (*load_session) (MooApp *app,
|
|
|
|
MooMarkupNode *xml);
|
|
|
|
void (*save_session) (MooApp *app,
|
|
|
|
MooMarkupNode *xml);
|
2008-08-22 22:52:54 -05:00
|
|
|
|
|
|
|
void (*init_plugins) (MooApp *app);
|
2005-06-22 18:20:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
GType moo_app_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2010-12-14 01:12:20 -08:00
|
|
|
MooApp *moo_app_instance (void);
|
2005-06-22 18:20:32 +00:00
|
|
|
|
2010-12-12 02:29:20 -08:00
|
|
|
gboolean moo_app_init (MooApp *app);
|
|
|
|
int moo_app_run (MooApp *app);
|
|
|
|
gboolean moo_app_quit (MooApp *app);
|
|
|
|
|
|
|
|
void moo_app_set_exit_status (MooApp *app,
|
|
|
|
int value);
|
|
|
|
|
|
|
|
void moo_app_load_session (MooApp *app);
|
|
|
|
|
|
|
|
MooEditor *moo_app_get_editor (MooApp *app);
|
|
|
|
|
|
|
|
void moo_app_prefs_dialog (GtkWidget *parent);
|
|
|
|
void moo_app_about_dialog (GtkWidget *parent);
|
|
|
|
|
|
|
|
char *moo_app_get_system_info (MooApp *app);
|
|
|
|
|
|
|
|
MooUiXml *moo_app_get_ui_xml (MooApp *app);
|
|
|
|
void moo_app_set_ui_xml (MooApp *app,
|
|
|
|
MooUiXml *xml);
|
|
|
|
|
|
|
|
gboolean moo_app_send_msg (const char *pid,
|
|
|
|
const char *data,
|
|
|
|
int len);
|
|
|
|
|
2011-01-10 02:31:07 -08:00
|
|
|
gboolean moo_app_send_files (MooOpenInfoArray *files,
|
2010-12-12 02:29:20 -08:00
|
|
|
guint32 stamp,
|
|
|
|
const char *pid);
|
|
|
|
void moo_app_open_files (MooApp *app,
|
2011-01-10 02:31:07 -08:00
|
|
|
MooOpenInfoArray *files,
|
2010-12-12 02:29:20 -08:00
|
|
|
guint32 stamp);
|
|
|
|
void moo_app_run_script (MooApp *app,
|
|
|
|
const char *script);
|
2007-07-13 03:42:31 -05:00
|
|
|
|
2005-06-22 18:20:32 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
2007-05-20 04:42:10 -05:00
|
|
|
#endif /* MOO_APP_H */
|