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

« back to all changes in this revision

Viewing changes to src/gldit/cairo-dock-dock-facility.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
* This file is a part of the Cairo-Dock project
 
3
*
 
4
* Copyright : (C) see the 'copyright' file.
 
5
* E-mail    : see the 'copyright' file.
 
6
*
 
7
* This program is free software; you can redistribute it and/or
 
8
* modify it under the terms of the GNU General Public License
 
9
* as published by the Free Software Foundation; either version 3
 
10
* of the License, or (at your option) any later version.
 
11
*
 
12
* This program is distributed in the hope that it will be useful,
 
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
* GNU General Public License for more details.
 
16
* You should have received a copy of the GNU General Public License
 
17
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
18
*/
 
19
 
 
20
 
 
21
#ifndef __CAIRO_DOCK_FACILITY__
 
22
#define  __CAIRO_DOCK_FACILITY__
 
23
 
 
24
#include <glib.h>
 
25
 
 
26
#include "cairo-dock-struct.h"
 
27
#include "cairo-dock-dock-factory.h"
 
28
G_BEGIN_DECLS
 
29
 
 
30
/**
 
31
*@file cairo-dock-dock-facility.h This class contains functions to manipulate docks.
 
32
* Some functions are dedicated to linear docks, that is to say when the icon's position can be defined by 1 coordinate inside a non looped interval; it doesn't mean they have to be drawn on a straight line though, see the Curve view.
 
33
*/
 
34
 
 
35
/* Retourne la largeur max autorisee pour un dock.
 
36
* @param pDock le dock.
 
37
* @return la taille max.
 
38
*/
 
39
#define cairo_dock_get_max_authorized_dock_width(pDock) (myAccessibility.iMaxAuthorizedWidth == 0 ? g_desktopGeometry.iScreenWidth[pDock->container.bIsHorizontal] : MIN (myAccessibility.iMaxAuthorizedWidth, g_desktopGeometry.iScreenWidth[pDock->container.bIsHorizontal]))
 
40
 
 
41
/* Dis si un dock est etendu ou pas.
 
42
* @param pDock le dock.
 
43
* @return TRUE ssi le dock doit remplir l'ecran.
 
44
*/
 
45
#define cairo_dock_is_extended_dock(pDock) (myAccessibility.bExtendedMode && (pDock->iRefCount == 0))
 
46
 
 
47
#define cairo_dock_is_hidden(pDock) ((pDock)->iRefCount == 0 && (pDock)->bAutoHide && (pDock)->fHideOffset == 1 && (!g_pHidingBackend || !g_pHidingBackend->bCanDisplayHiddenDock))
 
48
 
 
49
/*
 
50
* Recharge les reflets (cairo) d'un dock. Utile si le dock a changé de position.
 
51
* @param pDock un dock.
 
52
*/
 
53
void cairo_dock_reload_reflects_in_dock (CairoDock *pDock);
 
54
 
 
55
 
 
56
/** Compute the maximum size of a dock, and resize it if necessary.
 
57
* It takes into account the size limit, and moves the dock so that it stays centered. Also updates the dock's background if necessary, and re-place the appli thumbnails.
 
58
*@param pDock the dock.
 
59
*/
 
60
void cairo_dock_update_dock_size (CairoDock *pDock);
 
61
 
 
62
/** Calculate the position of all icons inside a dock, and triggers the enter/leave events according to the position of the mouse.
 
63
*@param pDock the dock.
 
64
*@return the pointed icon, or NULL if none is pointed.
 
65
*/
 
66
Icon *cairo_dock_calculate_dock_icons (CairoDock *pDock);
 
67
 
 
68
 
 
69
/* Demande au WM d'empecher les autres fenetres d'empieter sur l'espace du dock.
 
70
* L'espace reserve est pris sur la taille minimale du dock, c'est-a-dire la taille de la zone de rappel si l'auto-hide est active,
 
71
* ou la taille du dock au repos sinon.
 
72
* @param pDock le dock.
 
73
* @param bReserve TRUE pour reserver l'espace, FALSE pour annuler la reservation.
 
74
*/
 
75
void cairo_dock_reserve_space_for_dock (CairoDock *pDock, gboolean bReserve);
 
76
 
 
77
/* Borne la position d'un dock a l'interieur de l'ecran.
 
78
*@param pDock le dock.
 
79
*/
 
80
void cairo_dock_prevent_dock_from_out_of_screen (CairoDock *pDock);
 
81
 
 
82
/* Calcule la position d'un dock etant donne ses nouvelles dimensions.
 
83
*/
 
84
void cairo_dock_get_window_position_at_balance (CairoDock *pDock, int iNewWidth, int iNewHeight, int *iNewPositionX, int *iNewPositionY);
 
85
 
 
86
/* Deplace et redimensionne un dock a ses position et taille attitrees. Ne change pas la zone d'input (cela doit etre fait par ailleurs), et ne la replace pas (cela est fait lors du configure).
 
87
*/
 
88
void cairo_dock_move_resize_dock (CairoDock *pDock);
 
89
#define cairo_dock_place_root_dock cairo_dock_move_resize_dock
 
90
 
 
91
/* Met a jour les zones d'input d'un dock.
 
92
*/
 
93
void cairo_dock_update_input_shape (CairoDock *pDock);
 
94
 
 
95
#define cairo_dock_set_input_shape_active(pDock) do {\
 
96
        gtk_widget_input_shape_combine_mask (pDock->container.pWidget, NULL, 0, 0);\
 
97
        if (pDock->fMagnitudeMax == 0.)\
 
98
                gtk_widget_input_shape_combine_mask (pDock->container.pWidget, pDock->pShapeBitmap, 0, 0);\
 
99
        } while (0)
 
100
#define cairo_dock_set_input_shape_at_rest(pDock) do {\
 
101
        gtk_widget_input_shape_combine_mask (pDock->container.pWidget, NULL, 0, 0);\
 
102
        gtk_widget_input_shape_combine_mask (pDock->container.pWidget, pDock->pShapeBitmap, 0, 0);\
 
103
        } while (0)
 
104
#define cairo_dock_set_input_shape_hidden(pDock) do {\
 
105
        gtk_widget_input_shape_combine_mask (pDock->container.pWidget, NULL, 0, 0);\
 
106
        gtk_widget_input_shape_combine_mask (pDock->container.pWidget, pDock->pHiddenShapeBitmap, 0, 0);\
 
107
        } while (0)
 
108
 
 
109
/** Pop up a sub-dock.
 
110
*@param pPointedIcon icon pointing on the sub-dock.
 
111
*@param pParentDock dock containing the icon.
 
112
*/
 
113
void cairo_dock_show_subdock (Icon *pPointedIcon, CairoDock *pParentDock);
 
114
 
 
115
 
 
116
/** Calculate the position at rest (when the mouse is outside of the dock and its size is normal) of the icons of a linear dock.
 
117
*@param pIconList a list of icons.
 
118
*@param fFlatDockWidth width of all the icons placed next to each other.
 
119
*@param iXOffset an offset on the position of the first icon.
 
120
*@return the element containing the most left icon.
 
121
*/
 
122
GList * cairo_dock_calculate_icons_positions_at_rest_linear (GList *pIconList, double fFlatDockWidth, int iXOffset);
 
123
 
 
124
double cairo_dock_calculate_max_dock_width (CairoDock *pDock, GList *pFirstDrawnElement, double fFlatDockWidth, double fWidthConstraintFactor, double fExtraWidth);
 
125
 
 
126
Icon * cairo_dock_calculate_wave_with_position_linear (GList *pIconList, GList *pFirstDrawnElement, int x_abs, gdouble fMagnitude, double fFlatDockWidth, int iWidth, int iHeight, double fAlign, double fLateralFactor, gboolean bDirectionUp);
 
127
 
 
128
/** Apply a wave effect on the icons of a linear dock. It is the famous zoom when the mouse hovers an icon.
 
129
*@param pDock a linear dock.
 
130
*@return the pointed icon, or NULL if none is pointed.
 
131
*/
 
132
Icon *cairo_dock_apply_wave_effect_linear (CairoDock *pDock);
 
133
#define cairo_dock_apply_wave_effect cairo_dock_apply_wave_effect_linear
 
134
 
 
135
/** Get the current width of all the icons of a linear dock. It doesn't take into account any decoration or frame, only the space occupied by the icons.
 
136
*@param pDock a linear dock.
 
137
*/
 
138
double cairo_dock_get_current_dock_width_linear (CairoDock *pDock);
 
139
 
 
140
/** Check the position of the mouse inside a linear dock. It can be inside, on the edge, or outside. Update the 'iMousePositionType' field.
 
141
*@param pDock a linear dock.
 
142
*/
 
143
void cairo_dock_check_if_mouse_inside_linear (CairoDock *pDock);
 
144
 
 
145
void cairo_dock_manage_mouse_position (CairoDock *pDock);
 
146
 
 
147
/** Check if one can drop inside a linear dock.
 
148
*Drop is allowed between 2 icons of the launchers group, if the user is dragging something over the dock. Update the 'bCanDrop' field.
 
149
*@param pDock a linear dock.
 
150
*/
 
151
void cairo_dock_check_can_drop_linear (CairoDock *pDock);
 
152
 
 
153
void cairo_dock_stop_marking_icons (CairoDock *pDock);
 
154
 
 
155
void cairo_dock_set_subdock_position_linear (Icon *pPointedIcon, CairoDock *pParentDock);
 
156
 
 
157
 
 
158
/** Get the first icon to be drawn inside a linear dock, so that if you draw from left to right, the pointed icon will be drawn at last.
 
159
*@param icons a list of icons of a linear dock.
 
160
*@return the element of the list that contains the first icon to draw.
 
161
*/
 
162
GList *cairo_dock_get_first_drawn_element_linear (GList *icons);
 
163
 
 
164
 
 
165
void cairo_dock_trigger_redraw_subdock_content (CairoDock *pDock);
 
166
void cairo_dock_trigger_redraw_subdock_content_on_icon (Icon *icon);
 
167
 
 
168
void cairo_dock_redraw_subdock_content (CairoDock *pDock);
 
169
 
 
170
void cairo_dock_trigger_set_WM_icons_geometry (CairoDock *pDock);
 
171
 
 
172
 
 
173
G_END_DECLS
 
174
#endif