Back to index

bamf  0.2.120
bamf-tab-source.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2010 Canonical Ltd.
00003  *
00004  * This program is free software: you can redistribute it and/or modify it
00005  * under the terms of either or both of the following licenses:
00006  *
00007  * 1) the GNU Lesser General Public License version 3, as published by the
00008  * Free Software Foundation; and/or
00009  * 2) the GNU Lesser General Public License version 2.1, as published by
00010  * the Free Software Foundation.
00011  *
00012  * This program is distributed in the hope that it will be useful, but
00013  * WITHOUT ANY WARRANTY; without even the implied warranties of
00014  * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
00015  * PURPOSE.  See the applicable version of the GNU Lesser General Public
00016  * License for more details.
00017  *
00018  * You should have received a copy of both the GNU Lesser General Public
00019  * License version 3 and version 2.1 along with this program.  If not, see
00020  * <http://www.gnu.org/licenses/>
00021  *
00022  * Authored by: Jason Smith <jason.smith@canonical.com>
00023  *
00024  */
00025 
00026 #ifndef __BAMF_TAB_SOURCE_H__
00027 #define __BAMF_TAB_SOURCE_H__
00028 
00029 #include <glib-object.h>
00030 
00031 G_BEGIN_DECLS
00032 
00033 #define BAMF_TYPE_TAB_SOURCE              (bamf_tab_source_get_type ())
00034 #define BAMF_TAB_SOURCE(obj)              (G_TYPE_CHECK_INSTANCE_CAST ((obj), BAMF_TYPE_TAB_SOURCE, BamfTabSource))
00035 #define BAMF_TAB_SOURCE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BAMF_TYPE_TAB_SOURCE, BamfTabSource const))
00036 #define BAMF_TAB_SOURCE_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), BAMF_TYPE_TAB_SOURCE, BamfTabSourceClass))
00037 #define BAMF_IS_TAB_SOURCE(obj)           (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BAMF_TYPE_TAB_SOURCE))
00038 #define BAMF_IS_TAB_SOURCE_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), BAMF_TYPE_TAB_SOURCE))
00039 #define BAMF_TAB_SOURCE_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), BAMF_TYPE_TAB_SOURCE, BamfTabSourceClass))
00040 
00041 typedef struct _BamfTabSource             BamfTabSource;
00042 typedef struct _BamfTabSourceClass BamfTabSourceClass;
00043 typedef struct _BamfTabSourcePrivate      BamfTabSourcePrivate;
00044 
00045 struct _BamfTabSource {
00046        GObject parent;
00047 
00048        BamfTabSourcePrivate *priv;
00049 };
00050 
00051 struct _BamfTabSourceClass {
00052        GObjectClass parent_class;
00053 
00054        /*< methods >*/
00055        void      (*show_tab)      (BamfTabSource *source, char *tab_id);
00056        char   ** (*tab_ids)       (BamfTabSource *source);
00057        GArray  * (*tab_preview)   (BamfTabSource *source, char *tab_id);
00058        char    * (*tab_uri)       (BamfTabSource *source, char *tab_id);
00059        guint32   (*tab_xid)       (BamfTabSource *source, char *tab_id);
00060 };
00061 
00062 GType bamf_tab_source_get_type (void) G_GNUC_CONST;
00063 
00064 gboolean       bamf_tab_source_show_tab        (BamfTabSource *source,
00065                                                 char *tab_id,
00066                                                 GError *error);
00067 
00068 char        ** bamf_tab_source_get_tab_ids     (BamfTabSource *source);
00069 
00070 GArray       * bamf_tab_source_get_tab_preview (BamfTabSource *source,
00071                                                 char *tab_id);
00072 
00073 char         * bamf_tab_source_get_tab_uri     (BamfTabSource *source,
00074                                                 char *tab_id);
00075 
00076 guint32        bamf_tab_source_get_tab_xid     (BamfTabSource *source,
00077                                                 char *tab_id);
00078 
00079 G_END_DECLS
00080 
00081 #endif /* __BAMF_TAB_SOURCE_H__ */