Back to index

bamf  0.2.120
Classes | Defines | Enumerations | Functions | Variables
bamf-tab.c File Reference
#include "bamf-tab.h"
#include "bamf-marshal.h"

Go to the source code of this file.

Classes

struct  _BamfTabPrivate

Defines

#define BAMF_TAB_GET_PRIVATE(object)   (G_TYPE_INSTANCE_GET_PRIVATE((object), BAMF_TYPE_TAB, BamfTabPrivate))

Enumerations

enum  { PROP_0, PROP_ID, PROP_URI, PROP_PREVIEW }
enum  { URI_CHANGED, PREVIEW_UPDATED, LAST_SIGNAL }

Functions

gchar * bamf_tab_get_id (BamfTab *tab)
gchar * bamf_tab_get_preview (BamfTab *tab)
void bamf_tab_set_preview (BamfTab *tab, gchar *uri)
gchar * bamf_tab_get_uri (BamfTab *tab)
void bamf_tab_set_uri (BamfTab *tab, gchar *uri)
void bamf_tab_show (BamfTab *self)
static void bamf_tab_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
static void bamf_tab_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
static void bamf_tab_constructed (GObject *object)
static void bamf_tab_dispose (GObject *object)
static void bamf_tab_class_init (BamfTabClass *klass)
static void bamf_tab_init (BamfTab *self)
BamfTab * bamf_tab_new (gchar *id, gchar *uri)

Variables

static guint tab_signals [LAST_SIGNAL] = { 0 }

Class Documentation

struct _BamfTabPrivate

Definition at line 48 of file bamf-tab.c.

Class Members
BamfDBusItemTab * dbus_iface
char * id
gchar * id
gchar * preview_uri
BamfTabSource * source
char * uri
gchar * uri

Define Documentation

#define BAMF_TAB_GET_PRIVATE (   object)    (G_TYPE_INSTANCE_GET_PRIVATE((object), BAMF_TYPE_TAB, BamfTabPrivate))

Definition at line 27 of file bamf-tab.c.


Enumeration Type Documentation

anonymous enum
Enumerator:
PROP_0 
PROP_ID 
PROP_URI 
PROP_PREVIEW 

Definition at line 29 of file bamf-tab.c.

anonymous enum
Enumerator:
URI_CHANGED 
PREVIEW_UPDATED 
LAST_SIGNAL 

Definition at line 38 of file bamf-tab.c.


Function Documentation

static void bamf_tab_class_init ( BamfTabClass *  klass) [static]

Definition at line 170 of file bamf-tab.c.

{
  GParamSpec *pspec;
  GObjectClass *object_class = G_OBJECT_CLASS (klass);
          
  object_class->constructed = bamf_tab_constructed;
  object_class->dispose = bamf_tab_dispose;
  object_class->set_property = bamf_tab_set_property;
  object_class->get_property = bamf_tab_get_property;

  pspec = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
  g_object_class_install_property (object_class, PROP_ID, pspec);

  pspec = g_param_spec_string ("uri", "uri", "uri", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
  g_object_class_install_property (object_class, PROP_URI, pspec);

  pspec = g_param_spec_string ("preview", "preview", "preview", NULL, G_PARAM_READWRITE);
  g_object_class_install_property (object_class, PROP_PREVIEW, pspec);

  g_type_class_add_private (object_class, sizeof (BamfTabPrivate));
  
  tab_signals [URI_CHANGED] = 
       g_signal_new ("uri-changed",
                     G_OBJECT_CLASS_TYPE (klass),
                     G_SIGNAL_RUN_FIRST,
                     G_STRUCT_OFFSET (BamfTabClass, uri_changed),
                     NULL, NULL,
                     _bamf_marshal_VOID__STRING_STRING,
                     G_TYPE_NONE, 2, 
                     G_TYPE_STRING, G_TYPE_STRING);
  
  tab_signals [PREVIEW_UPDATED] = 
       g_signal_new ("preview-updated",
                     G_OBJECT_CLASS_TYPE (klass),
                     G_SIGNAL_RUN_FIRST,
                     G_STRUCT_OFFSET (BamfTabClass, preview_updated),
                     NULL, NULL,
                     g_cclosure_marshal_VOID__VOID,
                     G_TYPE_NONE, 0);
}

Here is the call graph for this function:

static void bamf_tab_constructed ( GObject *  object) [static]

Definition at line 158 of file bamf-tab.c.

{
  G_OBJECT_CLASS (bamf_tab_parent_class)->constructed (object);
}

Here is the caller graph for this function:

static void bamf_tab_dispose ( GObject *  object) [static]

Definition at line 164 of file bamf-tab.c.

{
  G_OBJECT_CLASS (bamf_tab_parent_class)->dispose (object);
}

Here is the caller graph for this function:

gchar* bamf_tab_get_id ( BamfTab *  tab)

Definition at line 58 of file bamf-tab.c.

{
  g_return_val_if_fail (BAMF_IS_TAB (tab), NULL);
  
  return tab->priv->id;
}

Here is the caller graph for this function:

gchar* bamf_tab_get_preview ( BamfTab *  tab)

Definition at line 66 of file bamf-tab.c.

{
  g_return_val_if_fail (BAMF_IS_TAB (tab), NULL);
  
  return tab->priv->preview_uri;
}

Here is the caller graph for this function:

static void bamf_tab_get_property ( GObject *  object,
guint  property_id,
GValue *  value,
GParamSpec *  pspec 
) [static]

Definition at line 134 of file bamf-tab.c.

{
  BamfTab *self;

  self = BAMF_TAB (object);

  switch (property_id)
    {
      case PROP_ID:
        g_value_set_string (value, bamf_tab_get_id (self));
        break;
      case PROP_URI:
        g_value_set_string (value, bamf_tab_get_uri (self));
        break;
      case PROP_PREVIEW:
        g_value_set_string (value, bamf_tab_get_preview (self));
        break;

      default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

gchar* bamf_tab_get_uri ( BamfTab *  tab)

Definition at line 82 of file bamf-tab.c.

{
  g_return_val_if_fail (BAMF_IS_TAB (tab), NULL);
  
  return tab->priv->uri;
}

Here is the caller graph for this function:

static void bamf_tab_init ( BamfTab *  self) [static]

Definition at line 212 of file bamf-tab.c.

{
  self->priv = BAMF_TAB_GET_PRIVATE (self);
}
BamfTab* bamf_tab_new ( gchar *  id,
gchar *  uri 
)

Definition at line 218 of file bamf-tab.c.

{
  return g_object_new (BAMF_TYPE_TAB, NULL);
}

Here is the caller graph for this function:

void bamf_tab_set_preview ( BamfTab *  tab,
gchar *  uri 
)

Definition at line 74 of file bamf-tab.c.

{
  g_return_if_fail (BAMF_IS_TAB (tab));
  
  tab->priv->preview_uri = uri;
}

Here is the caller graph for this function:

static void bamf_tab_set_property ( GObject *  object,
guint  property_id,
const GValue *  value,
GParamSpec *  pspec 
) [static]

Definition at line 111 of file bamf-tab.c.

{
  BamfTab *self;

  self = BAMF_TAB (object);

  switch (property_id)
    {
      case PROP_ID:
        self->priv->id = g_value_dup_string (value);
        break;
      case PROP_URI:
        bamf_tab_set_uri (self, g_value_dup_string (value));
        break;
      case PROP_PREVIEW:
        bamf_tab_set_preview (self, g_value_dup_string (value));
        break;
      default:
        G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void bamf_tab_set_uri ( BamfTab *  tab,
gchar *  uri 
)

Definition at line 90 of file bamf-tab.c.

{
  gchar *old;

  g_return_if_fail (BAMF_IS_TAB (tab));
  
  old = tab->priv->uri;
  tab->priv->uri = uri;

  g_signal_emit (tab, tab_signals[URI_CHANGED], 0, old, uri);  
}

Here is the caller graph for this function:

void bamf_tab_show ( BamfTab *  self)

Definition at line 102 of file bamf-tab.c.

{
  if (BAMF_TAB_GET_CLASS (self)->show)
    BAMF_TAB_GET_CLASS (self)->show (self);
  else
    g_warning ("Default tab class implementation cannot perform show!\n");
}

Here is the caller graph for this function:


Variable Documentation

guint tab_signals[LAST_SIGNAL] = { 0 } [static]

Definition at line 46 of file bamf-tab.c.