2007-05-07 00:26:18 -05:00
|
|
|
/*
|
|
|
|
* moopane.h
|
|
|
|
*
|
2010-12-21 20:15:45 -08:00
|
|
|
* Copyright (C) 2004-2010 by Yevgen Muntyan <emuntyan@users.sourceforge.net>
|
2007-05-07 00:26:18 -05: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.
|
2007-05-07 00:26:18 -05: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/>.
|
2007-05-07 00:26:18 -05:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MOO_PANE_H
|
|
|
|
#define MOO_PANE_H
|
|
|
|
|
2011-09-26 00:41:51 -07:00
|
|
|
#include <gtk/gtk.h>
|
2007-05-07 00:26:18 -05:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
|
|
|
|
#define MOO_TYPE_PANE (moo_pane_get_type ())
|
|
|
|
#define MOO_PANE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), MOO_TYPE_PANE, MooPane))
|
|
|
|
#define MOO_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MOO_TYPE_PANE, MooPaneClass))
|
|
|
|
#define MOO_IS_PANE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), MOO_TYPE_PANE))
|
|
|
|
#define MOO_IS_PANE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MOO_TYPE_PANE))
|
|
|
|
#define MOO_PANE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MOO_TYPE_PANE, MooPaneClass))
|
|
|
|
|
|
|
|
#define MOO_TYPE_PANE_LABEL (moo_pane_label_get_type ())
|
|
|
|
#define MOO_TYPE_PANE_PARAMS (moo_pane_params_get_type ())
|
|
|
|
|
2010-12-08 01:25:34 -08:00
|
|
|
typedef struct _MooPane MooPane;
|
|
|
|
typedef struct _MooPaneClass MooPaneClass;
|
|
|
|
typedef struct _MooPaneLabel MooPaneLabel;
|
|
|
|
typedef struct _MooPaneParams MooPaneParams;
|
2007-05-07 00:26:18 -05:00
|
|
|
|
2010-12-08 01:25:34 -08:00
|
|
|
struct _MooPaneLabel {
|
2007-05-07 00:26:18 -05:00
|
|
|
char *icon_stock_id;
|
|
|
|
GdkPixbuf *icon_pixbuf;
|
|
|
|
char *label;
|
|
|
|
char *window_title;
|
|
|
|
};
|
|
|
|
|
2010-12-08 01:25:34 -08:00
|
|
|
struct _MooPaneParams
|
2007-05-07 00:26:18 -05:00
|
|
|
{
|
|
|
|
GdkRectangle window_position;
|
|
|
|
guint detached : 1;
|
|
|
|
guint maximized : 1;
|
|
|
|
guint keep_on_top : 1;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
GType moo_pane_get_type (void) G_GNUC_CONST;
|
|
|
|
GType moo_pane_label_get_type (void) G_GNUC_CONST;
|
|
|
|
GType moo_pane_params_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2008-01-04 21:08:39 -06:00
|
|
|
const char *moo_pane_get_id (MooPane *pane);
|
|
|
|
|
2007-05-07 00:26:18 -05:00
|
|
|
void moo_pane_set_label (MooPane *pane,
|
|
|
|
MooPaneLabel *label);
|
|
|
|
/* result must be freed with moo_pane_label_free() */
|
|
|
|
MooPaneLabel *moo_pane_get_label (MooPane *pane);
|
2008-09-13 16:24:35 -05:00
|
|
|
void moo_pane_set_frame_markup (MooPane *pane,
|
|
|
|
const char *markup);
|
|
|
|
void moo_pane_set_frame_text (MooPane *pane,
|
|
|
|
const char *text);
|
2007-05-07 00:26:18 -05:00
|
|
|
void moo_pane_set_params (MooPane *pane,
|
|
|
|
MooPaneParams *params);
|
|
|
|
/* result must be freed with moo_pane_params_free() */
|
|
|
|
MooPaneParams *moo_pane_get_params (MooPane *pane);
|
|
|
|
void moo_pane_set_detachable (MooPane *pane,
|
|
|
|
gboolean detachable);
|
|
|
|
gboolean moo_pane_get_detachable (MooPane *pane);
|
|
|
|
void moo_pane_set_removable (MooPane *pane,
|
|
|
|
gboolean removable);
|
|
|
|
gboolean moo_pane_get_removable (MooPane *pane);
|
|
|
|
|
|
|
|
GtkWidget *moo_pane_get_child (MooPane *pane);
|
|
|
|
int moo_pane_get_index (MooPane *pane);
|
|
|
|
|
|
|
|
void moo_pane_open (MooPane *pane);
|
|
|
|
void moo_pane_present (MooPane *pane);
|
|
|
|
void moo_pane_attach (MooPane *pane);
|
|
|
|
void moo_pane_detach (MooPane *pane);
|
|
|
|
|
2008-01-02 20:00:23 -06:00
|
|
|
void moo_pane_set_drag_dest (MooPane *pane);
|
|
|
|
void moo_pane_unset_drag_dest (MooPane *pane);
|
|
|
|
|
2007-05-07 00:26:18 -05:00
|
|
|
MooPaneParams *moo_pane_params_new (GdkRectangle *window_position,
|
|
|
|
gboolean detached,
|
|
|
|
gboolean maximized,
|
|
|
|
gboolean keep_on_top);
|
|
|
|
MooPaneParams *moo_pane_params_copy (MooPaneParams *params);
|
|
|
|
void moo_pane_params_free (MooPaneParams *params);
|
|
|
|
|
|
|
|
MooPaneLabel *moo_pane_label_new (const char *icon_stock_id,
|
|
|
|
GdkPixbuf *pixbuf,
|
|
|
|
const char *label,
|
|
|
|
const char *window_title);
|
|
|
|
MooPaneLabel *moo_pane_label_copy (MooPaneLabel *label);
|
|
|
|
void moo_pane_label_free (MooPaneLabel *label);
|
|
|
|
|
|
|
|
MooPane *_moo_pane_new (GtkWidget *child,
|
|
|
|
MooPaneLabel *label);
|
2008-01-04 21:08:39 -06:00
|
|
|
void _moo_pane_set_id (MooPane *pane,
|
|
|
|
const char *id);
|
2007-05-07 00:26:18 -05:00
|
|
|
|
|
|
|
gpointer _moo_pane_get_parent (MooPane *pane);
|
|
|
|
GtkWidget *_moo_pane_get_frame (MooPane *pane);
|
|
|
|
void _moo_pane_update_focus_child (MooPane *pane);
|
|
|
|
GtkWidget *_moo_pane_get_focus_child (MooPane *pane);
|
|
|
|
GtkWidget *_moo_pane_get_button (MooPane *pane);
|
2008-09-13 16:24:35 -05:00
|
|
|
void _moo_pane_get_handle (MooPane *pane,
|
|
|
|
GtkWidget **big,
|
2010-08-30 22:19:58 -07:00
|
|
|
GtkWidget **small_);
|
2007-05-07 00:26:18 -05:00
|
|
|
GtkWidget *_moo_pane_get_window (MooPane *pane);
|
|
|
|
|
|
|
|
void _moo_pane_params_changed (MooPane *pane);
|
|
|
|
void _moo_pane_freeze_params (MooPane *pane);
|
|
|
|
void _moo_pane_thaw_params (MooPane *pane);
|
|
|
|
void _moo_pane_size_request (MooPane *pane,
|
|
|
|
GtkRequisition *req);
|
|
|
|
void _moo_pane_get_size_request (MooPane *pane,
|
|
|
|
GtkRequisition *req);
|
|
|
|
void _moo_pane_size_allocate (MooPane *pane,
|
|
|
|
GtkAllocation *allocation);
|
|
|
|
|
|
|
|
gboolean _moo_pane_get_detached (MooPane *pane);
|
|
|
|
void _moo_pane_attach (MooPane *pane);
|
|
|
|
void _moo_pane_detach (MooPane *pane);
|
|
|
|
void _moo_pane_set_parent (MooPane *pane,
|
|
|
|
gpointer parent,
|
|
|
|
GdkWindow *window);
|
|
|
|
void _moo_pane_unparent (MooPane *pane);
|
|
|
|
void _moo_pane_try_remove (MooPane *pane);
|
|
|
|
|
2007-12-29 21:37:37 -06:00
|
|
|
typedef enum {
|
|
|
|
MOO_SMALL_ICON_HIDE,
|
|
|
|
MOO_SMALL_ICON_STICKY,
|
|
|
|
MOO_SMALL_ICON_CLOSE,
|
|
|
|
MOO_SMALL_ICON_DETACH,
|
|
|
|
MOO_SMALL_ICON_ATTACH,
|
|
|
|
MOO_SMALL_ICON_KEEP_ON_TOP
|
|
|
|
} MooSmallIcon;
|
|
|
|
|
|
|
|
GtkWidget *_moo_create_small_icon (MooSmallIcon icon);
|
2008-01-01 17:53:41 -06:00
|
|
|
GtkWidget *_moo_create_arrow_icon (GtkArrowType arrow_type);
|
2007-12-29 21:37:37 -06:00
|
|
|
|
2007-05-07 00:26:18 -05:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* MOO_PANE_H */
|