~ubuntu-branches/ubuntu/maverick/cairo-dock/maverick

« back to all changes in this revision

Viewing changes to src/gldit/cairo-dock-desklet-manager.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2010-08-09 23:26:12 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20100809232612-yp4c6ig3jt1bzpdv
Tags: 2.2.0~0beta4-0ubuntu1
* New Upstream Version (LP: #614624)
* Fixed a few bugs on LP:
 - LP: #518453: Dock appears under all windows
                 (Compiz - fullscreen window)
 - LP: #521369: Separator are not removed when closing
                 grouped windows
 - LP: #521762: Some sentences are not correct
 - LP: #526466: Icons of apps with same class shouldn't
                 be stacked by default
 - LP: #535083: Dialogues looks ugly when a lot of them
                 appears at the same time
 - More details on the 'ChangeLog' file
* debian/rules:
 - Autotools has been replaced by CMake
 - Man pages are now included in the source code
* debian/copyright:
 - Updated with the new pathes and new files
* debian/control:
 - Autotools has been replaced by CMake
 - Added libcurl4-gnutls-dev as Build-deps
 - Bump Standard-Version to 3.9.1
* debian/cairo-dock-core.install:
 - Man pages are now included in the source code
 - All sonames are now installed into lib32 or lib64
* debian/cairo-dock-dev.install:
 - pkgconfig is now installed into lib32 or lib64

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
** Login : <ctaf42@gmail.com>
 
3
** Started on  Sun Jan 27 18:35:38 2008 Cedric GESTES
 
4
** $Id$
 
5
**
 
6
** Author(s)
 
7
**  - Cedric GESTES <ctaf42@gmail.com>
 
8
**  - Fabrice REY
 
9
**
 
10
** Copyright (C) 2008 Cedric GESTES
 
11
** This program is free software; you can redistribute it and/or modify
 
12
** it under the terms of the GNU General Public License as published by
 
13
** the Free Software Foundation; either version 3 of the License, or
 
14
** (at your option) any later version.
 
15
**
 
16
** This program is distributed in the hope that it will be useful,
 
17
** but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
19
** GNU General Public License for more details.
 
20
**
 
21
** You should have received a copy of the GNU General Public License
 
22
** along with this program; if not, write to the Free Software
 
23
** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
24
*/
 
25
 
 
26
#ifndef __CAIRO_DESKLET_MANAGER_H__
 
27
#define  __CAIRO_DESKLET_MANAGER_H__
 
28
 
 
29
#include "cairo-dock-struct.h"
 
30
#include "cairo-dock-surface-factory.h"
 
31
#include "cairo-dock-load.h"
 
32
#include "cairo-dock-container.h"
 
33
G_BEGIN_DECLS
 
34
 
 
35
 
 
36
/**
 
37
*@file cairo-dock-desklet-manager.h This class manages the Desklets, that are Widgets placed directly on your desktop.
 
38
* A Desklet is a container that holds 1 applet's icon plus an optionnal list of other icons and an optionnal GTK widget, has a decoration, suports several accessibility types (like Compiz Widget Layer), and has a renderer.
 
39
* Desklets can be resized or moved directly with the mouse, and can be rotated in the 3 directions of space.
 
40
*/
 
41
 
 
42
/// Definition of a function that runs through all desklets.
 
43
typedef gboolean (* CairoDockForeachDeskletFunc) (CairoDesklet *pDesklet, gpointer data);
 
44
 
 
45
struct _CairoDeskletManager {
 
46
        CairoDockManager mgr;
 
47
        CairoDesklet* (*create_desklet) (Icon *pIcon, CairoDeskletAttribute *pAttributes);
 
48
        void (*destroy_desklet) (CairoDesklet *pDesklet);
 
49
        
 
50
        void (*foreach_desklet) (CairoDockForeachDeskletFunc pCallback, gpointer user_data);
 
51
        void (*reload_desklets_decorations) (gboolean bDefaultThemeOnly);
 
52
        void (*set_all_desklets_visible) (gboolean bOnWidgetLayerToo);
 
53
        void (*set_desklets_visibility_to_default) (void);
 
54
        void (*get_desklet_by_Xid) (Window Xid);
 
55
        
 
56
        void (*find_clicked_icon_in_desklet) (CairoDesklet *pDesklet);
 
57
        } ;
 
58
 
 
59
void cairo_dock_init_desklet_manager (void);
 
60
void cairo_dock_load_desklet_buttons (void);
 
61
void cairo_dock_unload_desklet_buttons (void);
 
62
 
 
63
 
 
64
/** Create a desklet linked to an Icon, and load its configuration.
 
65
*@param pIcon the main icon, or NULL.
 
66
*@param pAttributes the configuration attributes, or NULL.
 
67
*@return the newly allocated desklet.
 
68
*/
 
69
CairoDesklet *cairo_dock_create_desklet (Icon *pIcon, CairoDeskletAttribute *pAttributes);
 
70
 
 
71
/** Destroy a desklet.
 
72
*@param pDesklet a desklet.
 
73
*/
 
74
void cairo_dock_destroy_desklet (CairoDesklet *pDesklet);
 
75
 
 
76
 
 
77
/** Run a function through all the desklets. If the callback returns TRUE, then the loop ends and the function returns the current desklet.
 
78
*@param pCallback function to be called on eash desklet. If it returns TRUE, the loop ends and the function returns the current desklet.
 
79
*@param user_data data to be passed to the callback.
 
80
*@return the found desklet, or NULL.
 
81
*/
 
82
CairoDesklet *cairo_dock_foreach_desklet (CairoDockForeachDeskletFunc pCallback, gpointer user_data);
 
83
 
 
84
/** Reload the decorations of all the desklets. 
 
85
*@param bDefaultThemeOnly whether to reload only the desklet that have the default decoration theme.
 
86
*/
 
87
void cairo_dock_reload_desklets_decorations (gboolean bDefaultThemeOnly);
 
88
 
 
89
/** Make all desklets visible. Their accessibility is set to #CAIRO_DESKLET_NORMAL. 
 
90
*@param bOnWidgetLayerToo TRUE if you want to act on the desklet that are on the WidgetLayer as well.
 
91
*/
 
92
void cairo_dock_set_all_desklets_visible (gboolean bOnWidgetLayerToo);
 
93
 
 
94
/** Reset the desklets accessibility to the state defined in their conf file.
 
95
*/
 
96
void cairo_dock_set_desklets_visibility_to_default (void);
 
97
 
 
98
/** Search the desklet whose X ID matches the given one.
 
99
*@param Xid an X ID.
 
100
*@return the desklet that matches, or NULL if none match.
 
101
*/
 
102
CairoDesklet *cairo_dock_get_desklet_by_Xid (Window Xid);
 
103
 
 
104
 
 
105
/** Find the currently pointed icon in a desklet, taking into account the 3D rotations.
 
106
*@param pDesklet the desklet.
 
107
*@return the pointed icon, or NULL if none.
 
108
*/
 
109
Icon *cairo_dock_find_clicked_icon_in_desklet (CairoDesklet *pDesklet);
 
110
 
 
111
G_END_DECLS
 
112
 
 
113
#endif