Back to index

bamf  0.2.120
bamf-tab-source.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2010-2011 Canonical Ltd
00003  *
00004  * This program is free software: you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License version 3 as
00006  * published by the Free Software Foundation.
00007  *
00008  * This program is distributed in the hope that it will be useful,
00009  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011  * GNU General Public License for more details.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00015  *
00016  * Authored by: Jason Smith <jason.smith@canonical.com>
00017  *              Marco Trevisan (TreviƱo) <3v1n0@ubuntu.com>
00018  *
00019  */
00020 
00021 #ifndef __BAMFTABSOURCE_H__
00022 #define __BAMFTABSOURCE_H__
00023 
00024 #include "bamf.h"
00025 #include <glib.h>
00026 #include <glib-object.h>
00027 
00028 #define BAMF_TYPE_TAB_SOURCE                     (bamf_tab_source_get_type ())
00029 #define BAMF_TAB_SOURCE(obj)                     (G_TYPE_CHECK_INSTANCE_CAST ((obj), BAMF_TYPE_TAB_SOURCE, BamfTabSource))
00030 #define BAMF_IS_TAB_SOURCE(obj)                  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BAMF_TYPE_TAB_SOURCE))
00031 #define BAMF_TAB_SOURCE_CLASS(klass)             (G_TYPE_CHECK_CLASS_CAST ((klass), BAMF_TYPE_TAB_SOURCE, BamfTabSourceClass))
00032 #define BAMF_IS_TAB_SOURCE_CLASS(klass)          (G_TYPE_CHECK_CLASS_TYPE ((klass), BAMF_TYPE_TAB_SOURCE))
00033 #define BAMF_TAB_SOURCE_GET_CLASS(obj)           (G_TYPE_INSTANCE_GET_CLASS ((obj), BAMF_TYPE_TAB_SOURCE, BamfTabSourceClass))
00034 
00035 typedef struct _BamfTabSource BamfTabSource;
00036 typedef struct _BamfTabSourceClass BamfTabSourceClass;
00037 typedef struct _BamfTabSourcePrivate BamfTabSourcePrivate;
00038 
00039 struct _BamfTabSourceClass
00040 {
00041   GObjectClass parent;
00042 
00043   /*< signals >*/
00044   void    (*tab_uri_changed)   (char *id, char *old_uri, char *new_uri);
00045   void    (*tab_opened)        (char *id);
00046   void    (*tab_closed)        (char *id);
00047 };
00048 
00049 struct _BamfTabSource
00050 {
00051   GObject parent;
00052 
00053   /* private */
00054   BamfTabSourcePrivate *priv;
00055 };
00056 
00057 GType           bamf_tab_source_get_type         (void) G_GNUC_CONST;
00058 
00059 char         ** bamf_tab_source_tab_ids          (BamfTabSource *self);
00060 
00061 void            bamf_tab_source_show_tab         (BamfTabSource *self, char *id);
00062 
00063 gchar         * bamf_tab_source_get_tab_preview  (BamfTabSource *self, char *id);
00064 
00065 char          * bamf_tab_source_get_tab_uri      (BamfTabSource *self, char *id);
00066 
00067 guint32         bamf_tab_source_get_tab_xid      (BamfTabSource *self, char *id);
00068 
00069 BamfTabSource * bamf_tab_source_new              (char *bus, char *path);
00070 
00071 #endif