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
 *
8
 * This library is free software; you can redistribute it and/or
9
 * modify it under the terms of the GNU Lesser General Public License
10
 * version 2.1 as published by the Free Software Foundation.
11
 *
12
 * This library is distributed in the hope that it will be useful, but
13
 * WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
 * Lesser General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU Lesser General Public
18
 * License along with this library; if not, write to the Free Software
19
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20
 * 02110-1301 USA
21
 *
22
 */
23
24
#ifndef __HD_HOME_VIEW_H__
25
#define __HD_HOME_VIEW_H__
26
27
#include <glib.h>
28
#include <glib-object.h>
29
#include <X11/Xlib.h>
30
31
#include <clutter/clutter-group.h>
32
#include <matchbox/core/mb-wm.h>
33
#include <matchbox/core/mb-wm-client.h>
34
35
G_BEGIN_DECLS
36
37
#define HD_TYPE_HOME_VIEW            (hd_home_view_get_type ())
38
#define HD_HOME_VIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), HD_TYPE_HOME_VIEW, HdHomeView))
39
#define HD_HOME_VIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), HD_TYPE_HOME_VIEW, HdHomeViewClass))
40
#define HD_IS_HOME_VIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), HD_TYPE_HOME_VIEW))
41
#define HD_IS_HOME_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), HD_TYPE_HOME_VIEW))
42
#define HD_HOME_VIEW_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), HD_TYPE_HOME_VIEW, HdHomeViewClass))
43
44
typedef struct _HdHomeView        HdHomeView;
45
typedef struct _HdHomeViewClass   HdHomeViewClass;
46
typedef struct _HdHomeViewPrivate HdHomeViewPrivate;
47
48
struct _HdHomeViewClass
49
{
50
  ClutterGroupClass parent_class;
51
};
52
53
struct _HdHomeView
54
{
55
  ClutterGroup          parent;
56
57
  HdHomeViewPrivate    *priv;
58
};
59
60
GType hd_home_view_get_type (void);
61
62
void hd_home_view_set_background_image (HdHomeView *view, const gchar * path);
63
64
void hd_home_view_set_thumbnail_mode (HdHomeView * view, gboolean on);
65
66
guint hd_home_view_get_view_id (HdHomeView *view);
67
68
void hd_home_view_add_applet (HdHomeView   *view,
69
                              ClutterActor *applet,
70
                              gboolean      force_arrange);
71
GSList *hd_home_view_get_all_applets (HdHomeView *view);
72
73
void hd_home_view_unregister_applet (HdHomeView *view, ClutterActor *applet);
74
void hd_home_view_remove_applet (HdHomeView *view, ClutterActor *applet);
75
76
void hd_home_view_move_applet (HdHomeView   *old_view, HdHomeView   *new_view,
77
			       ClutterActor *applet);
78
79
void hd_home_view_close_all_applets (HdHomeView *view);
80
81
gboolean hd_home_view_get_active (HdHomeView *view);
82
void     hd_home_view_set_active (HdHomeView *view,
83
                                  gboolean    active);
84
85
MBWindowManagerClient *hd_home_view_get_live_bg (HdHomeView *view);
86
void hd_home_view_set_live_bg (HdHomeView *view,
87
                               MBWindowManagerClient *client,
88
                               gboolean above_applets);
89
void hd_home_view_load_background (HdHomeView *view);
90
void hd_home_view_update_state (HdHomeView *view);
91
92
G_END_DECLS
93
94
#endif