~paulliu/+junk/gnome-control-center-test1-panel

« back to all changes in this revision

Viewing changes to shell/cc-shell.h

  • Committer: Ying-Chun Liu (PaulLiu)
  • Date: 2012-07-12 08:27:17 UTC
  • Revision ID: grandpaul@gmail.com-20120712082717-8a6a58niy41biku8
Add shell subdir

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 Intel, Inc.
 
4
 *
 
5
 * The Control Center is free software; you can redistribute it and/or modify
 
6
 * it under the terms of the GNU General Public License as published by the
 
7
 * Free Software Foundation; either version 2 of the License, or (at your
 
8
 * option) any later version.
 
9
 *
 
10
 * The Control Center is distributed in the hope that it will be useful, but
 
11
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
 
12
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 
13
 * for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License along
 
16
 * with the Control Center; if not, write to the Free Software Foundation,
 
17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
18
 *
 
19
 * Author: Thomas Wood <thos@gnome.org>
 
20
 */
 
21
 
 
22
#ifndef _CC_SHELL_H
 
23
#define _CC_SHELL_H
 
24
 
 
25
#include <gtk/gtk.h>
 
26
 
 
27
G_BEGIN_DECLS
 
28
 
 
29
#define CC_TYPE_SHELL cc_shell_get_type()
 
30
 
 
31
#define CC_SHELL(obj) \
 
32
  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
 
33
  CC_TYPE_SHELL, CcShell))
 
34
 
 
35
#define CC_SHELL_CLASS(klass) \
 
36
  (G_TYPE_CHECK_CLASS_CAST ((klass), \
 
37
  CC_TYPE_SHELL, CcShellClass))
 
38
 
 
39
#define CC_IS_SHELL(obj) \
 
40
  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
 
41
  CC_TYPE_SHELL))
 
42
 
 
43
#define CC_IS_SHELL_CLASS(klass) \
 
44
  (G_TYPE_CHECK_CLASS_TYPE ((klass), \
 
45
  CC_TYPE_SHELL))
 
46
 
 
47
#define CC_SHELL_GET_CLASS(obj) \
 
48
  (G_TYPE_INSTANCE_GET_CLASS ((obj), \
 
49
  CC_TYPE_SHELL, CcShellClass))
 
50
 
 
51
 
 
52
#define CC_SHELL_PANEL_EXTENSION_POINT "control-center-1"
 
53
 
 
54
typedef struct _CcShell CcShell;
 
55
typedef struct _CcShellClass CcShellClass;
 
56
typedef struct _CcShellPrivate CcShellPrivate;
 
57
 
 
58
/* cc-panel.h requires CcShell, so make sure they are defined first */
 
59
#include "cc-panel.h"
 
60
 
 
61
/**
 
62
 * CcShell:
 
63
 *
 
64
 * The contents of this struct are private should not be accessed directly.
 
65
 */
 
66
struct _CcShell
 
67
{
 
68
  /*< private >*/
 
69
  GObject parent;
 
70
 
 
71
  CcShellPrivate *priv;
 
72
};
 
73
 
 
74
/**
 
75
 * CcShellClass:
 
76
 * @set_active_panel_from_id: virtual function to set the active panel from an
 
77
 *                            id string
 
78
 *
 
79
 */
 
80
struct _CcShellClass
 
81
{
 
82
  /*< private >*/
 
83
  GObjectClass parent_class;
 
84
 
 
85
  /*< public >*/
 
86
  /* vfuncs */
 
87
  gboolean    (*set_active_panel_from_id) (CcShell      *shell,
 
88
                                           const gchar  *id,
 
89
                                           const gchar **argv,
 
90
                                           GError      **error);
 
91
  GtkWidget * (*get_toplevel)             (CcShell      *shell);
 
92
  void        (*embed_widget_in_header)   (CcShell      *shell,
 
93
                                           GtkWidget    *widget);
 
94
};
 
95
 
 
96
GType           cc_shell_get_type                 (void) G_GNUC_CONST;
 
97
 
 
98
CcPanel*        cc_shell_get_active_panel         (CcShell      *shell);
 
99
void            cc_shell_set_active_panel         (CcShell      *shell,
 
100
                                                   CcPanel      *panel);
 
101
gboolean        cc_shell_set_active_panel_from_id (CcShell      *shell,
 
102
                                                   const gchar  *id,
 
103
                                                   const gchar **argv,
 
104
                                                   GError      **error);
 
105
GtkWidget *     cc_shell_get_toplevel             (CcShell      *shell);
 
106
 
 
107
void            cc_shell_embed_widget_in_header   (CcShell      *shell,
 
108
                                                   GtkWidget    *widget);
 
109
 
 
110
G_END_DECLS
 
111
 
 
112
#endif /* _CC_SHELL_H */