medit/moo/mooedit/mooeditwindow.h

119 lines
5.5 KiB
C
Raw Normal View History

2006-05-21 18:11:05 -05:00
/*
2005-09-02 23:27:25 +00:00
* mooeditwindow.h
*
2010-11-07 01:20:45 -08:00
* Copyright (C) 2004-2010 by Yevgen Muntyan <emuntyan@sourceforge.net>
2005-09-02 23:27:25 +00: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-09-02 23:27:25 +00: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-09-02 23:27:25 +00:00
*/
#ifndef MOO_EDIT_WINDOW_H
#define MOO_EDIT_WINDOW_H
2005-09-02 23:27:25 +00:00
2010-11-23 21:54:39 -08:00
#include <mooedit/mooedittypes.h>
#include <mooedit/mooedit.h>
2009-11-01 12:44:46 -08:00
#include <mooedit/mooedit-enums.h>
#include <mooutils/moowindow.h>
#include <mooutils/moobigpaned.h>
2010-11-23 21:54:39 -08:00
#include <mooutils/mooatom.h>
2005-09-02 23:27:25 +00:00
G_BEGIN_DECLS
#define MOO_TYPE_EDIT_WINDOW (moo_edit_window_get_type ())
#define MOO_EDIT_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MOO_TYPE_EDIT_WINDOW, MooEditWindow))
#define MOO_EDIT_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MOO_TYPE_EDIT_WINDOW, MooEditWindowClass))
#define MOO_IS_EDIT_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MOO_TYPE_EDIT_WINDOW))
#define MOO_IS_EDIT_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MOO_TYPE_EDIT_WINDOW))
#define MOO_EDIT_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MOO_TYPE_EDIT_WINDOW, MooEditWindowClass))
2010-12-12 02:29:20 -08:00
typedef struct MooEditWindowPrivate MooEditWindowPrivate;
typedef struct MooEditWindowClass MooEditWindowClass;
2005-09-02 23:27:25 +00:00
2010-12-12 02:29:20 -08:00
struct MooEditWindow
2005-09-02 23:27:25 +00:00
{
MooWindow parent;
MooEditWindowPrivate *priv;
MooBigPaned *paned;
2005-09-02 23:27:25 +00:00
};
2010-12-12 02:29:20 -08:00
struct MooEditWindowClass
2005-09-02 23:27:25 +00:00
{
MooWindowClass parent_class;
2005-09-05 04:24:21 +00:00
/* these do not open or close document */
2005-09-07 11:19:26 +00:00
void (*new_doc) (MooEditWindow *window,
MooEdit *doc);
void (*close_doc) (MooEditWindow *window,
MooEdit *doc);
void (*close_doc_after) (MooEditWindow *window);
2005-09-02 23:27:25 +00:00
};
2010-11-23 21:54:39 -08:00
#define MOO_EDIT_TAB_ATOM_NAME "MOO_EDIT_TAB"
#define MOO_EDIT_TAB_ATOM (moo_edit_tab_atom ())
MOO_DECLARE_ATOM_GLOBAL (MOO_EDIT_TAB, moo_edit_tab)
2005-09-02 23:27:25 +00:00
2010-11-23 21:54:39 -08:00
GType moo_edit_window_get_type (void) G_GNUC_CONST;
2005-09-02 23:27:25 +00:00
2010-11-23 21:54:39 -08:00
gboolean moo_edit_window_close_all (MooEditWindow *window);
2010-11-23 21:54:39 -08:00
typedef gboolean (*MooActionCheckFunc) (GtkAction *action,
MooEditWindow *window,
MooEdit *doc,
gpointer data);
void moo_edit_window_set_action_check (const char *action_id,
MooActionCheckType type,
MooActionCheckFunc func,
gpointer data,
GDestroyNotify notify);
void moo_edit_window_set_action_filter (const char *action_id,
MooActionCheckType type,
const char *filter);
2005-09-07 11:19:26 +00:00
2010-11-23 21:54:39 -08:00
MooEdit *moo_edit_window_get_active_doc (MooEditWindow *window);
void moo_edit_window_set_active_doc (MooEditWindow *window,
MooEdit *edit);
2010-12-18 23:58:18 -08:00
MooEditView *moo_edit_window_get_active_view (MooEditWindow *window);
void moo_edit_window_set_active_view (MooEditWindow *window,
MooEditView *view);
2006-04-16 17:02:19 -05:00
2010-11-23 21:54:39 -08:00
MooEditor *moo_edit_window_get_editor (MooEditWindow *window);
MooEdit *moo_edit_window_get_nth_doc (MooEditWindow *window,
guint n);
2010-12-18 23:58:18 -08:00
MooEditView *moo_edit_window_get_nth_view (MooEditWindow *window,
guint n);
2010-11-23 21:54:39 -08:00
MooEditArray *moo_edit_window_get_docs (MooEditWindow *window);
2010-12-18 23:58:18 -08:00
MooEditViewArray*moo_edit_window_get_views (MooEditWindow *window);
2010-12-08 01:11:51 -08:00
int moo_edit_window_num_docs (MooEditWindow *window);
2005-11-07 06:56:33 +00:00
/* sinks widget */
2010-11-23 21:54:39 -08:00
MooPane *moo_edit_window_add_pane (MooEditWindow *window,
const char *user_id,
GtkWidget *widget,
MooPaneLabel *label,
MooPanePosition position);
gboolean moo_edit_window_remove_pane (MooEditWindow *window,
const char *user_id);
GtkWidget *moo_edit_window_get_pane (MooEditWindow *window,
const char *user_id);
2005-09-02 23:27:25 +00:00
2005-11-18 13:02:42 +00:00
typedef void (*MooAbortJobFunc) (gpointer job);
2010-11-23 21:54:39 -08:00
void moo_edit_window_add_stop_client (MooEditWindow *window,
GObject *client);
2010-11-23 21:54:39 -08:00
void moo_edit_window_remove_stop_client (MooEditWindow *window,
GObject *client);
2010-11-23 21:54:39 -08:00
void moo_edit_window_abort_jobs (MooEditWindow *window);
2006-04-16 17:02:19 -05:00
2006-03-14 14:59:07 -06:00
2005-09-02 23:27:25 +00:00
G_END_DECLS
#endif /* MOO_EDIT_WINDOW_H */