1
/*
2
 * This file is part of hildon-desktop
3
 *
4
 * Copyright (C) 2008 Nokia Corporation.
5
 *
6
 * Author:  Tomas Frydrych <tf@o-hand.com>
7
 *          Kimmo Hämäläinen <kimmo.hamalainen@nokia.com>
8
 *
9
 * This library is free software; you can redistribute it and/or
10
 * modify it under the terms of the GNU Lesser General Public License
11
 * version 2.1 as published by the Free Software Foundation.
12
 *
13
 * This library is distributed in the hope that it will be useful, but
14
 * WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
 * Lesser General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU Lesser General Public
19
 * License along with this library; if not, write to the Free Software
20
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
21
 * 02110-1301 USA
22
 *
23
 */
24
25
#ifndef __HD_HOME_H__
26
#define __HD_HOME_H__
27
28
#include <glib.h>
29
#include <glib-object.h>
30
31
#include <clutter/clutter-group.h>
32
#include <matchbox/core/mb-wm.h>
33
34
#include "hd-home-view.h"
35
36
#define HD_EDGE_INDICATION_WIDTH 50
37
38
G_BEGIN_DECLS
39
40
#define HD_TYPE_HOME            (hd_home_get_type ())
41
#define HD_HOME(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), HD_TYPE_HOME, HdHome))
42
#define HD_HOME_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), HD_TYPE_HOME, HdHomeClass))
43
#define HD_IS_HOME(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HD_TYPE_HOME))
44
#define HD_IS_HOME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HD_TYPE_HOME))
45
#define HD_HOME_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), HD_TYPE_HOME, HdHomeClass))
46
47
typedef struct _HdHome        HdHome;
48
typedef struct _HdHomeClass   HdHomeClass;
49
typedef struct _HdHomePrivate HdHomePrivate;
50
51
struct _HdHomeClass
52
{
53
  ClutterGroupClass parent_class;
54
55
  void (*background_clicked) (HdHome *home, ClutterButtonEvent *ev);
56
};
57
58
struct _HdHome
59
{
60
  ClutterGroup      parent;
61
62
  HdHomePrivate    *priv;
63
};
64
65
GType hd_home_get_type (void);
66
67
void hd_home_show_activate_views_dialog (HdHome *home);
68
69
void hd_home_add_applet (HdHome *home, ClutterActor *applet);
70
void hd_home_add_status_area (HdHome *home, ClutterActor *sa);
71
void hd_home_add_status_menu (HdHome *home, ClutterActor *sa);
72
73
void hd_home_remove_status_area (HdHome *home, ClutterActor *sa);
74
void hd_home_remove_status_menu (HdHome *home, ClutterActor *sa);
75
76
guint hd_home_get_current_view_id (HdHome *home);
77
ClutterActor *hd_home_get_current_view (HdHome *home);
78
GSList *hd_home_get_not_visible_views (HdHome *home);
79
80
ClutterActor *hd_home_get_edit_button (HdHome *home);
81
ClutterActor *hd_home_get_operator (HdHome *home);
82
ClutterActor *hd_home_get_front (HdHome *home);
83
84
void hd_home_set_operator_applet (HdHome *home, ClutterActor *operator);
85
gboolean hd_is_hildon_home_dialog (MBWindowManagerClient  *c);
86
87
void hd_home_show_edge_indication (HdHome *home);
88
void hd_home_hide_edge_indication (HdHome *home);
89
void hd_home_highlight_edge_indication (HdHome *home, gboolean left, gboolean right);
90
91
void hd_home_hide_edit_button (HdHome *home);
92
93
/* To be called from HdRenderManager on state change */
94
void hd_home_update_layout (HdHome * home);
95
96
/* Remove any hildon-home dialogs that are showing */
97
void hd_home_remove_dialogs(HdHome *home);
98
99
/* Called on theme change */
100
void hd_home_theme_changed (HdHome *home);
101
102
void hd_home_unregister_applet (HdHome       *home,
103
                                ClutterActor *applet);
104
void hd_home_set_live_background (HdHome *home, MBWindowManagerClient *client);
105
106
G_END_DECLS
107
108
#endif