~ubuntu-branches/ubuntu/trusty/unity-control-center/trusty

« back to all changes in this revision

Viewing changes to shell/cc-panel.h

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2014-01-08 16:29:18 UTC
  • Revision ID: package-import@ubuntu.com-20140108162918-g29dd08tr913y2qh
Tags: upstream-14.04.0
Import upstream version 14.04.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
 
2
 *
 
3
 * Copyright (C) 2010 Red Hat, Inc.
 
4
 * Copyright (C) 2010 Intel, Inc
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or modify
 
7
 * it under the terms of the GNU General Public License as published by
 
8
 * the Free Software Foundation; either version 2 of the License, or
 
9
 * (at your option) any later version.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program; if not, write to the Free Software
 
18
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
19
 *
 
20
 * Authors: William Jon McCann <jmccann@redhat.com>
 
21
 *          Thomas Wood <thomas.wood@intel.com>
 
22
 */
 
23
 
 
24
 
 
25
#ifndef __CC_PANEL_H
 
26
#define __CC_PANEL_H
 
27
 
 
28
#include <glib-object.h>
 
29
#include <gtk/gtk.h>
 
30
 
 
31
 
 
32
G_BEGIN_DECLS
 
33
 
 
34
#define CC_TYPE_PANEL         (cc_panel_get_type ())
 
35
#define CC_PANEL(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), CC_TYPE_PANEL, CcPanel))
 
36
#define CC_PANEL_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), CC_TYPE_PANEL, CcPanelClass))
 
37
#define CC_IS_PANEL(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), CC_TYPE_PANEL))
 
38
#define CC_IS_PANEL_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), CC_TYPE_PANEL))
 
39
#define CC_PANEL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), CC_TYPE_PANEL, CcPanelClass))
 
40
 
 
41
/*•
 
42
 * Utility macro used to register panels
 
43
 *
 
44
 * use: CC_PANEL_REGISTER (PluginName, plugin_name)
 
45
 */
 
46
#define CC_PANEL_REGISTER(PluginName, plugin_name)                             \
 
47
        G_DEFINE_DYNAMIC_TYPE (PluginName,                                     \
 
48
                               plugin_name,                                    \
 
49
                               CC_TYPE_PANEL)                                  \
 
50
static void                                                                    \
 
51
plugin_name##_class_finalize (PluginName##Class *plugin_name##_class)          \
 
52
{                                                                              \
 
53
}
 
54
 
 
55
typedef struct CcPanelPrivate CcPanelPrivate;
 
56
 
 
57
typedef struct _CcPanel       CcPanel;
 
58
typedef struct _CcPanelClass  CcPanelClass;
 
59
 
 
60
/* cc-shell.h requires CcPanel, so make sure it is defined first */
 
61
#include "cc-shell.h"
 
62
 
 
63
/**
 
64
 * CcPanel:
 
65
 *
 
66
 * The contents of this struct are private and should not be accessed directly.
 
67
 */
 
68
struct _CcPanel
 
69
{
 
70
  /*< private >*/
 
71
  GtkBin          parent;
 
72
  CcPanelPrivate *priv;
 
73
};
 
74
/**
 
75
 * CcPanelClass:
 
76
 *
 
77
 * The contents of this struct are private and should not be accessed directly.
 
78
 */
 
79
struct _CcPanelClass
 
80
{
 
81
  /*< private >*/
 
82
  GtkBinClass parent_class;
 
83
 
 
84
  GPermission * (* get_permission) (CcPanel *panel);
 
85
  const char  * (* get_help_uri)   (CcPanel *panel);
 
86
};
 
87
 
 
88
GType        cc_panel_get_type         (void);
 
89
 
 
90
CcShell*     cc_panel_get_shell        (CcPanel     *panel);
 
91
 
 
92
GPermission *cc_panel_get_permission   (CcPanel     *panel);
 
93
 
 
94
const char  *cc_panel_get_help_uri     (CcPanel     *panel);
 
95
 
 
96
const char  *cc_panel_get_display_name (CcPanel     *panel);
 
97
 
 
98
G_END_DECLS
 
99
 
 
100
#endif /* __CC_PANEL_H */