2
* panel-applet-container.c: a container for applets.
4
* Copyright (C) 2010 Carlos Garcia Campos <carlosgc@gnome.org>
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Library General Public
8
* License as published by the Free Software Foundation; either
9
* version 2 of the License, or (at your option) any later version.
11
* This library 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 GNU
14
* Library General Public License for more details.
16
* You should have received a copy of the GNU Library General Public
17
* License along with this library; if not, write to the
18
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19
* Boston, MA 02111-1307, USA.
23
#ifndef __PANEL_APPLET_CONTAINER_H__
24
#define __PANEL_APPLET_CONTAINER_H__
26
#include <glib-object.h>
32
#define PANEL_TYPE_APPLET_CONTAINER (panel_applet_container_get_type ())
33
#define PANEL_APPLET_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PANEL_TYPE_APPLET_CONTAINER, PanelAppletContainer))
34
#define PANEL_APPLET_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PANEL_TYPE_APPLET_CONTAINER, PanelAppletContainerClass))
35
#define PANEL_IS_APPLET_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PANEL_TYPE_APPLET_CONTAINER))
36
#define PANEL_IS_APPLET_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANEL_TYPE_APPLET_CONTAINER))
37
#define PANEL_APPLET_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANEL_TYPE_APPLET_CONTAINER, PanelAppletContainerClass))
39
#define PANEL_APPLET_CONTAINER_ERROR (panel_applet_container_error_quark())
42
PANEL_APPLET_CONTAINER_INVALID_APPLET,
43
PANEL_APPLET_CONTAINER_INVALID_CHILD_PROPERTY
44
} PanelAppletContainerError;
46
typedef struct _PanelAppletContainer PanelAppletContainer;
47
typedef struct _PanelAppletContainerClass PanelAppletContainerClass;
48
typedef struct _PanelAppletContainerPrivate PanelAppletContainerPrivate;
50
struct _PanelAppletContainer {
53
PanelAppletContainerPrivate *priv;
56
struct _PanelAppletContainerClass {
57
GtkEventBoxClass parent_class;
60
void (*applet_broken) (PanelAppletContainer *container);
61
void (*applet_move) (PanelAppletContainer *container);
62
void (*applet_remove) (PanelAppletContainer *container);
63
void (*applet_lock) (PanelAppletContainer *container,
65
void (*child_property_changed) (PanelAppletContainer *container,
66
const gchar *property_name,
70
GType panel_applet_container_get_type (void) G_GNUC_CONST;
71
GQuark panel_applet_container_error_quark (void) G_GNUC_CONST;
72
GtkWidget *panel_applet_container_new (void);
75
void panel_applet_container_add (PanelAppletContainer *container,
77
GCancellable *cancellable,
78
GAsyncReadyCallback callback,
80
GVariant *properties);
81
gboolean panel_applet_container_add_finish (PanelAppletContainer *container,
84
void panel_applet_container_child_popup_menu (PanelAppletContainer *container,
87
GCancellable *cancellable,
88
GAsyncReadyCallback callback,
90
gboolean panel_applet_container_child_popup_menu_finish (PanelAppletContainer *container,
94
void panel_applet_container_child_set (PanelAppletContainer *container,
95
const gchar *property_name,
96
const GVariant *value,
97
GCancellable *cancellable,
98
GAsyncReadyCallback callback,
100
gboolean panel_applet_container_child_set_finish (PanelAppletContainer *container,
101
GAsyncResult *result,
103
void panel_applet_container_child_get (PanelAppletContainer *container,
104
const gchar *property_name,
105
GCancellable *cancellable,
106
GAsyncReadyCallback callback,
108
GVariant *panel_applet_container_child_get_finish (PanelAppletContainer *container,
109
GAsyncResult *result,
114
#endif /* __PANEL_APPLET_CONTAINER_H__ */