~ps-jenkins/indicator-power/latestsnapshot-12.10.6+13.10.20131008-0ubuntu1

« back to all changes in this revision

Viewing changes to src/indicator-power.h

  • Committer: Tarmac
  • Author(s): Charles Kerr
  • Date: 2013-06-19 21:13:09 UTC
  • mfrom: (167.1.32 gmenuify)
  • Revision ID: tarmac-20130619211309-nj444ogmrhsi7r9f
Convert the power indicator into a service that exports GMenus and GActions in accordance with our indicator-ng design.

Approved by PS Jenkins bot, Ted Gould.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
An indicator to power related information in the menubar.
3
 
 
4
 
Copyright 2011 Canonical Ltd.
5
 
 
6
 
Authors:
7
 
    Javier Jardon <javier.jardon@codethink.co.uk>
8
 
 
9
 
This program is free software: you can redistribute it and/or modify it
10
 
under the terms of the GNU General Public License version 3, as published 
11
 
by the Free Software Foundation.
12
 
 
13
 
This program is distributed in the hope that it will be useful, but
14
 
WITHOUT ANY WARRANTY; without even the implied warranties of
15
 
MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
16
 
PURPOSE.  See the GNU General Public License for more details.
17
 
 
18
 
You should have received a copy of the GNU General Public License along
19
 
with this program.  If not, see <http://www.gnu.org/licenses/>.
20
 
*/
21
 
 
22
 
/* Gtk required */
23
 
#include <gtk/gtk.h>
24
 
 
25
 
/* parent class */
26
 
#include <libindicator/indicator.h>
27
 
#include <libindicator/indicator-object.h>
28
 
 
29
 
G_BEGIN_DECLS
30
 
 
31
 
#define INDICATOR_POWER_TYPE            (indicator_power_get_type ())
32
 
#define INDICATOR_POWER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_POWER_TYPE, IndicatorPower))
33
 
#define INDICATOR_POWER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_POWER_TYPE, IndicatorPowerClass))
34
 
#define IS_INDICATOR_POWER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_POWER_TYPE))
35
 
#define IS_INDICATOR_POWER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_POWER_TYPE))
36
 
#define INDICATOR_POWER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_POWER_TYPE, IndicatorPowerClass))
37
 
 
38
 
typedef struct _IndicatorPower         IndicatorPower;
39
 
typedef struct _IndicatorPowerClass    IndicatorPowerClass;
40
 
typedef struct _IndicatorPowerPrivate  IndicatorPowerPrivate;
41
 
 
42
 
struct _IndicatorPowerClass
43
 
{
44
 
  IndicatorObjectClass parent_class;
45
 
};
46
 
 
47
 
struct _IndicatorPower
48
 
{
49
 
  IndicatorObject parent_instance;
50
 
  IndicatorPowerPrivate * priv;
51
 
};
52
 
 
53
 
GType indicator_power_get_type (void) G_GNUC_CONST;
54
 
 
55
 
void indicator_power_set_devices (IndicatorPower         * power,
56
 
                                  GSList                 * devices);
57
 
 
58
 
IndicatorPowerDevice* indicator_power_choose_primary_device (GSList * devices);
59
 
 
60
 
G_END_DECLS