1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
/*
* Copyright (C) 2009 - 2011 Vivien Malerba <malerba@gnome-db.org>
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __BROWSER_PERSPECTIVE_H__
#define __BROWSER_PERSPECTIVE_H__
#include <gtk/gtk.h>
#include "decl.h"
G_BEGIN_DECLS
#define BROWSER_PERSPECTIVE_TYPE (browser_perspective_get_type())
#define BROWSER_PERSPECTIVE(obj) (G_TYPE_CHECK_INSTANCE_CAST (obj, BROWSER_PERSPECTIVE_TYPE, BrowserPerspective))
#define IS_BROWSER_PERSPECTIVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE (obj, BROWSER_PERSPECTIVE_TYPE))
#define BROWSER_PERSPECTIVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BROWSER_PERSPECTIVE_TYPE, BrowserPerspectiveIface))
/* struct for the interface */
struct _BrowserPerspectiveIface {
GTypeInterface g_iface;
/* virtual table */
BrowserWindow *(* i_get_window) (BrowserPerspective *perspective);
GtkActionGroup *(* i_get_actions_group) (BrowserPerspective *perspective);
const gchar *(* i_get_actions_ui) (BrowserPerspective *perspective);
void (* i_get_current_customization) (BrowserPerspective *perspective,
GtkActionGroup **out_agroup,
const gchar **out_ui);
void (* i_page_tab_label_change) (BrowserPerspective *perspective, BrowserPage *page);
};
/**
* SECTION:browser-perspective
* @short_description: A "perspective" in a #BrowserWindow window
* @title: BrowserPerspective
* @stability: Stable
* @see_also:
*
* #BrowserPerspective is an interface used by the #BrowserWindow object to switch
* between the activities ("perspectives"); it requires the #GtkWidget.
*/
GType browser_perspective_get_type (void) G_GNUC_CONST;
GtkActionGroup *browser_perspective_get_actions_group (BrowserPerspective *perspective);
const gchar *browser_perspective_get_actions_ui (BrowserPerspective *perspective);
void browser_perspective_get_current_customization (BrowserPerspective *perspective,
GtkActionGroup **out_agroup,
const gchar **out_ui);
void browser_perspective_page_tab_label_change (BrowserPerspective *perspective,
BrowserPage *page);
BrowserWindow *browser_perspective_get_window (BrowserPerspective *perspective);
void browser_perspective_declare_notebook (BrowserPerspective *perspective, GtkNotebook *nb);
G_END_DECLS
#endif
|