Back to index

indicator-power  12.10.0
Classes | Defines | Typedefs | Functions
indicator-power.h File Reference
#include <gtk/gtk.h>
#include <libindicator/indicator.h>
#include <libindicator/indicator-object.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _IndicatorPowerClass
struct  _IndicatorPower

Defines

#define INDICATOR_POWER_TYPE   (indicator_power_get_type ())
#define INDICATOR_POWER(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_POWER_TYPE, IndicatorPower))
#define INDICATOR_POWER_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_POWER_TYPE, IndicatorPowerClass))
#define IS_INDICATOR_POWER(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_POWER_TYPE))
#define IS_INDICATOR_POWER_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_POWER_TYPE))
#define INDICATOR_POWER_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_POWER_TYPE, IndicatorPowerClass))

Typedefs

typedef struct _IndicatorPower
typedef struct _IndicatorPowerClass
typedef struct _IndicatorPowerPrivate

Functions

GType indicator_power_get_type (void) G_GNUC_CONST
void indicator_power_set_devices (IndicatorPower *power, GSList *devices)

Class Documentation

struct _IndicatorPowerClass

Definition at line 42 of file indicator-power.h.

Class Members
IndicatorObjectClass parent_class
struct _IndicatorPower

Definition at line 47 of file indicator-power.h.

Class Members
IndicatorObject parent_instance
IndicatorPowerPrivate * priv

Define Documentation

#define INDICATOR_POWER (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_POWER_TYPE, IndicatorPower))

Definition at line 32 of file indicator-power.h.

#define INDICATOR_POWER_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_POWER_TYPE, IndicatorPowerClass))

Definition at line 33 of file indicator-power.h.

#define INDICATOR_POWER_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_POWER_TYPE, IndicatorPowerClass))

Definition at line 36 of file indicator-power.h.

Definition at line 31 of file indicator-power.h.

#define IS_INDICATOR_POWER (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_POWER_TYPE))

Definition at line 34 of file indicator-power.h.

#define IS_INDICATOR_POWER_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_POWER_TYPE))

Definition at line 35 of file indicator-power.h.


Typedef Documentation

typedef struct _IndicatorPower

Definition at line 38 of file indicator-power.h.

typedef struct _IndicatorPowerClass

Definition at line 39 of file indicator-power.h.

typedef struct _IndicatorPowerPrivate

Definition at line 40 of file indicator-power.h.


Function Documentation

GType indicator_power_get_type ( void  )
void indicator_power_set_devices ( IndicatorPower *  power,
GSList *  devices 
)

Definition at line 449 of file indicator-power.c.

{
  /* LCOV_EXCL_START */
  g_return_if_fail (IS_INDICATOR_POWER(self));
  /* LCOV_EXCL_STOP */

  IndicatorPowerPrivate * priv = self->priv;

  /* update our devices & primary device */
  g_slist_foreach (devices, (GFunc)g_object_ref, NULL);
  dispose_devices (self);
  priv->devices = g_slist_copy (devices);
  priv->device = get_primary_device (priv->devices);

  /* and our menus/visibility from the new device list */
  if (priv->device != NULL)
      put_primary_device (self, priv->device);
  else
      g_message ("Couldn't find primary device");
  build_menu (self);
  update_visibility (self);
}

Here is the call graph for this function:

Here is the caller graph for this function: