1 /* 2 * Copyright 2010-2011 Canonical Ltd. 3 * 4 * This program is free software: you can redistribute it and/or modify it 5 * under the terms of either or both of the following licenses: 6 * 7 * 1) the GNU Lesser General Public License version 3, as published by the 8 * Free Software Foundation; and/or 9 * 2) the GNU Lesser General Public License version 2.1, as published by 10 * the Free Software Foundation. 11 * 12 * This program is distributed in the hope that it will be useful, but 13 * WITHOUT ANY WARRANTY; without even the implied warranties of 14 * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR 15 * PURPOSE. See the applicable version of the GNU Lesser General Public 16 * License for more details. 17 * 18 * You should have received a copy of both the GNU Lesser General Public 19 * License version 3 and version 2.1 along with this program. If not, see 20 * <http://www.gnu.org/licenses/> 21 * 22 * Authored by: Jason Smith <jason.smith@canonical.com> 23 * Marco Trevisan (Treviño) <3v1n0@ubuntu.com> 24 * 25 */ 26 27 #ifndef __BAMF_TAB_H__ 28 #define __BAMF_TAB_H__ 29 30 #include <libbamf/bamf-view.h> 31 #include <glib-object.h> 32 33 G_BEGIN_DECLS 34 35 #define BAMF_TYPE_TAB (bamf_tab_get_type ()) 36 #define BAMF_TAB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BAMF_TYPE_TAB, BamfTab)) 37 #define BAMF_TAB_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BAMF_TYPE_TAB, BamfTab const)) 38 #define BAMF_TAB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BAMF_TYPE_TAB, BamfTabClass)) 39 #define BAMF_IS_TAB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BAMF_TYPE_TAB)) 40 #define BAMF_IS_TAB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BAMF_TYPE_TAB)) 41 #define BAMF_TAB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BAMF_TYPE_TAB, BamfTabClass)) 42 43 typedef struct _BamfTab BamfTab; 44 typedef struct _BamfTabClass BamfTabClass; 45 typedef struct _BamfTabPrivate BamfTabPrivate; 46 47 struct _BamfTab 48 { 49 BamfView parent; 50 BamfTabPrivate *priv; 51 }; 52 53 struct _BamfTabClass 54 { 55 BamfViewClass parent_class; 56 57 const gchar * (*get_desktop_name) (BamfTab *self); 58 const gchar * (*get_location) (BamfTab *self); 59 guint64 (*get_xid) (BamfTab *self); 60 gboolean (*get_is_foreground_tab) (BamfTab *self); 61 62 /*< private >*/ 63 void (*_tab_padding1) (void); 64 void (*_tab_padding2) (void); 65 void (*_tab_padding3) (void); 66 void (*_tab_padding4) (void); 67 }; 68 69 typedef void (*BamfTabPreviewReadyCallback) (BamfTab *self, const gchar *preview_data, gpointer user_data); 70 71 GType bamf_tab_get_type (void) G_GNUC_CONST; 72 73 gboolean bamf_tab_raise (BamfTab *self); 74 gboolean bamf_tab_close (BamfTab *self); 75 void bamf_tab_request_preview (BamfTab *self, 76 BamfTabPreviewReadyCallback callback, 77 gpointer user_data); 78 const gchar *bamf_tab_get_desktop_name (BamfTab *self); 79 const gchar *bamf_tab_get_location (BamfTab *self); 80 guint64 bamf_tab_get_xid (BamfTab *self); 81 gboolean bamf_tab_get_is_foreground_tab (BamfTab *self); 82 83 G_END_DECLS 84 85 #endif /* __BAMF_TAB_H__ */ 86