2
* This file is a part of the Cairo-Dock project
4
* Copyright : (C) see the 'copyright' file.
5
* E-mail : see the 'copyright' file.
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.
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/>.
21
#ifndef __CAIRO_DOCK_ICONS__
22
#define __CAIRO_DOCK_ICONS__
26
#include "cairo-dock-struct.h"
27
#include "cairo-dock-modules.h"
32
*@file cairo-dock-icons.h This class defines the items contained in containers : Icons.
33
* An Icon is an union of 3 parts : a launcher, an appli, and an applet. It can be all of them at the same time.
34
* - a launcher is any icon having a command or pointing to a sub-dock.
35
* - an appli is an icon representing an X window.
36
* - an applet is an icon holding a module instance.
37
* - an icon being none of them is a separator.
39
* The type of an icon is dynamic (for instance a launcher can become an application).
41
* Icons are sorted by the (group, order) pair; the group is also the initial type of the icon.
44
/// Definition of the groups of icons.
46
CAIRO_DOCK_LAUNCHER = 0,
47
CAIRO_DOCK_SEPARATOR12,
49
CAIRO_DOCK_SEPARATOR23,
54
/// Definition of the type of icons.
56
CAIRO_DOCK_ICON_TYPE_LAUNCHER = 0,
57
CAIRO_DOCK_ICON_TYPE_FILE,
58
CAIRO_DOCK_ICON_TYPE_CONTAINER,
59
CAIRO_DOCK_ICON_TYPE_SEPARATOR,
60
CAIRO_DOCK_ICON_TYPE_CLASS_CONTAINER,
61
CAIRO_DOCK_ICON_TYPE_APPLI,
62
CAIRO_DOCK_ICON_TYPE_APPLET,
63
CAIRO_DOCK_ICON_TYPE_OTHER,
64
CAIRO_DOCK_NB_ICON_TYPES
65
} CairoDockIconTrueType;
67
/// Animation state of an icon, sorted by priority.
69
CAIRO_DOCK_STATE_REST = 0,
70
CAIRO_DOCK_STATE_MOUSE_HOVERED,
71
CAIRO_DOCK_STATE_CLICKED,
72
CAIRO_DOCK_STATE_AVOID_MOUSE,
73
CAIRO_DOCK_STATE_FOLLOW_MOUSE,
74
CAIRO_DOCK_STATE_REMOVE_INSERT,
76
} CairoDockAnimationState;
79
struct _IconInterface {
80
/// function that loads the icon surface (and optionnally texture).
81
void (*load_image) (Icon *icon);
82
/// function called when the icon is deleted from the current theme.
83
gboolean (*on_delete) (Icon *icon);
84
/// function called when the user drag something over the icon for more than 500ms.
85
void (*action_on_drag_hover) (Icon *icon);
89
/// Definition of an Icon.
91
//\____________ Definition.
92
/// group of the icon.
93
CairoDockIconType iType;
95
GPtrArray *pNotificationsTab;
96
gpointer pDataSlot[CAIRO_DOCK_NB_DATA_SLOT];
98
//\____________ properties.
100
/// Name of the icon.
102
/// Short info displayed on the icon (few characters).
104
/// name or path of an image displayed on the icon.
106
/// Class of application the icon will be bound to.
108
/// name of the dock the icon belongs to (NULL means it's not currently inside a dock).
109
gchar *cParentDockName;
110
/// Sub-dock the icon is pointing to.
112
/// Order of the icon amongst the other icons of its group.
115
gint iSpecificDesktop;
116
gint iSubdockViewType;
117
/// a hint to indicate the icon should be kept static (no animation like bouncing).
119
/// a flag that allows the icon to be always visible, even with the dock is hidden.
120
gboolean bAlwaysVisible;
121
gboolean bIsDemandingAttention;
123
CairoDataRenderer *pDataRenderer;
124
CairoDockTransition *pTransition;
126
CairoDockAnimationState iAnimationState;
127
/// Whether the icon is currently pointed or not.
129
gdouble fInsertRemoveFactor;
132
gchar *cDesktopFileName; // nom (et non pas chemin) du fichier .desktop
134
gchar *cWorkingDirectory;
141
gboolean bIsFullScreen;
142
gboolean bIsMaximized;
143
gboolean bHasIndicator;
144
GtkAllocation windowGeometry;
146
gint iViewPortX, iViewPortY;
150
gchar *cLastAttentionDemand;
151
Pixmap iBackingPixmap;
152
//Damage iDamageHandle;
155
CairoDockModuleInstance *pModuleInstance;
156
CairoDockModuleInstance *pLinkedApplet;
158
//\____________ Buffers.
159
gdouble fWidth, fHeight; // taille dans le container.
160
gint iImageWidth, iImageHeight; // taille de la surface/texture telle qu'elle a ete creee.
161
cairo_surface_t* pIconBuffer;
163
cairo_surface_t* pReflectionBuffer;
165
gint iTextWidth, iTextHeight;
166
cairo_surface_t* pTextBuffer;
167
GLuint iLabelTexture;
169
gint iQuickInfoWidth, iQuickInfoHeight;
170
cairo_surface_t* pQuickInfoBuffer;
171
GLuint iQuickInfoTexture;
173
//\____________ Parametres de dessin, definis par la vue/les animations.
174
gdouble fXMin, fXMax; // Abscisse extremale gauche/droite que the icon atteindra (variable avec la vague).
175
gdouble fXAtRest; // Abscisse de the icon au repos.
176
gdouble fPhase; // Phase de the icon (entre -pi et piconi).
177
gdouble fX, fY; // Abscisse/Ordonnee temporaire du bord haut-gauche de l'image de the icon.
180
gdouble fDrawX, fDrawY;
181
gdouble fWidthFactor, fHeightFactor;
183
gdouble fDeltaYReflection; // Decalage en ordonnees du reflet (rebond).
184
gdouble fOrientation; // par rapport a la verticale Oz
185
gint iRotationX; // Rotation autour de l'axe Ox
186
gint iRotationY; // Rotation autour de l'axe Oy
187
gdouble fReflectShading;
189
gdouble fGlideOffset; // decalage pour le glissement des icons.
190
gint iGlideDirection; // direction dans laquelle glisse the icon.
191
gdouble fGlideScale; // echelle d'adaptation au glissement.
193
gboolean bBeingRemovedByCairo; // devrait etre dans pDataSlot...
195
guint iSidRedrawSubdockContent;
197
CairoContainer *pContainerForLoad;
199
CairoDockIconTrueType iTrueType;
200
gpointer reserved[3];
203
/// Definition of a function that runs through all icons.
204
typedef void (* CairoDockForeachIconFunc) (Icon *icon, CairoContainer *pContainer, gpointer data);
207
#define CAIRO_DOCK_ICON_TYPE_IS_LAUNCHER(icon) (icon != NULL && (icon)->iTrueType == CAIRO_DOCK_ICON_TYPE_LAUNCHER)
208
#define CAIRO_DOCK_ICON_TYPE_IS_FILE(icon) (icon != NULL && (icon)->iTrueType == CAIRO_DOCK_ICON_TYPE_FILE)
209
#define CAIRO_DOCK_ICON_TYPE_IS_CONTAINER(icon) (icon != NULL && (icon)->iTrueType == CAIRO_DOCK_ICON_TYPE_CONTAINER)
210
#define CAIRO_DOCK_ICON_TYPE_IS_SEPARATOR(icon) (icon != NULL && (icon)->iTrueType == CAIRO_DOCK_ICON_TYPE_SEPARATOR)
211
#define CAIRO_DOCK_ICON_TYPE_IS_CLASS_CONTAINER(icon) (icon != NULL && (icon)->iTrueType == CAIRO_DOCK_ICON_TYPE_CLASS_CONTAINER)
212
#define CAIRO_DOCK_ICON_TYPE_IS_APPLI(icon) (icon != NULL && (icon)->iTrueType == CAIRO_DOCK_ICON_TYPE_APPLI)
213
#define CAIRO_DOCK_ICON_TYPE_IS_APPLET(icon) (icon != NULL && (icon)->iTrueType == CAIRO_DOCK_ICON_TYPE_APPLET)
215
/** TRUE if the icon is a launcher (a real launcher with a command or an URI, or a container icon, or even a fake launcher).
216
*@param icon an icon.
218
#define CAIRO_DOCK_IS_LAUNCHER(icon) (icon != NULL && ((icon)->cCommand != NULL || (icon)->cBaseURI != NULL || ((icon)->pSubDock != NULL && (icon)->pModuleInstance == NULL)))
220
/** TRUE if the icon is an icon of appli.
221
*@param icon an icon.
223
#define CAIRO_DOCK_IS_APPLI(icon) (icon != NULL && (icon)->Xid != 0)
225
/** TRUE if the icon is an icon of applet.
226
*@param icon an icon.
228
#define CAIRO_DOCK_IS_APPLET(icon) (icon != NULL && (icon)->pModuleInstance != NULL)
230
/** TRUE if the icon is an icon of separator.
231
*@param icon an icon.
233
#define CAIRO_DOCK_IS_SEPARATOR(icon) (icon != NULL && (icon)->pModuleInstance == NULL && (icon)->Xid == 0 && (icon)->pSubDock == NULL && (icon)->cCommand == NULL && (icon)->cBaseURI == NULL)
235
/** TRUE if the icon is an icon of launcher launching something.
236
*@param icon an icon.
238
#define CAIRO_DOCK_IS_NORMAL_LAUNCHER(icon) (CAIRO_DOCK_IS_LAUNCHER (icon) && (icon)->cCommand != NULL)
240
/** TRUE if the icon is an icon of launcher defined by a .desktop file.
241
*@param icon an icon.
243
#define CAIRO_DOCK_IS_STORED_LAUNCHER(icon) (CAIRO_DOCK_IS_LAUNCHER (icon) && (icon)->cDesktopFileName != NULL)
245
/** TRUE if the icon is an icon representing an URI.
246
*@param icon an icon.
248
#define CAIRO_DOCK_IS_URI_LAUNCHER(icon) (CAIRO_DOCK_IS_LAUNCHER (icon) && (icon)->cBaseURI != NULL)
250
/** TRUE if the icon is a fake icon (for class groupment).
251
*@param icon an icon.
253
#define CAIRO_DOCK_IS_FAKE_LAUNCHER(icon) (icon != NULL && (icon)->cCommand == NULL && (icon)->cClass != NULL && (icon)->pModuleInstance == NULL && (icon)->pSubDock != NULL && (icon)->cDesktopFileName == NULL)
255
/** TRUE if the icon is a container icon.
256
*@param icon an icon.
258
#define CAIRO_DOCK_IS_CONTAINER_LAUNCHER(icon) (CAIRO_DOCK_IS_LAUNCHER (icon) && (icon)->cCommand == NULL && (icon)->cBaseURI == NULL && icon->cClass == NULL)
260
/** TRUE if the icon is an icon pointing on the sub-dock of a class.
261
*@param icon an icon.
263
#define CAIRO_DOCK_IS_MULTI_APPLI(icon) (CAIRO_DOCK_IS_LAUNCHER (icon) && icon->pSubDock != NULL && icon->pSubDock->icons != NULL && icon->cClass != NULL)
265
/** TRUE if the icon is an icon of automatic separator.
266
*@param icon an icon.
268
#define CAIRO_DOCK_IS_AUTOMATIC_SEPARATOR(icon) (CAIRO_DOCK_IS_SEPARATOR (icon) && (icon)->cDesktopFileName == NULL)
270
/** TRUE if the icon is an icon of separator added by the user.
271
*@param icon an icon.
273
#define CAIRO_DOCK_IS_USER_SEPARATOR(icon) (CAIRO_DOCK_IS_SEPARATOR (icon) && (icon)->cDesktopFileName != NULL)
275
*TRUE if the icon is an icon d'appli seulement.
276
*@param icon an icon.
278
#define CAIRO_DOCK_IS_NORMAL_APPLI(icon) (CAIRO_DOCK_IS_APPLI (icon) && CAIRO_DOCK_ICON_TYPE_IS_APPLI (icon))
280
*TRUE if the icon is an icon d'applet detachable en desklet.
281
*@param icon an icon.
283
#define CAIRO_DOCK_IS_DETACHABLE_APPLET(icon) (CAIRO_DOCK_IS_APPLET (icon) && (icon)->pModuleInstance->bCanDetach)
286
/** Destroy an icon, freeing all allocated ressources. Ths sub-dock is not unreferenced, this must be done beforehand. It also deactivate the icon before (dialog, class, Xid, module) if necessary.
287
*@param icon the icon to free.
289
void cairo_dock_free_icon (Icon *icon);
292
/** Say whether an icon is currently being inserted.
294
#define cairo_dock_icon_is_being_inserted(icon) ((icon)->fInsertRemoveFactor < 0)
295
/** Say whether an icon is currently being removed.
297
#define cairo_dock_icon_is_being_removed(icon) ((icon)->fInsertRemoveFactor > 0)
298
#define cairo_dock_icon_is_being_inserted_or_removed(icon) ((icon)->fInsertRemoveFactor != 0)
301
#define cairo_dock_get_group_order(iType) (iType < CAIRO_DOCK_NB_TYPES ? myIcons.tIconTypeOrder[iType] : iType)
302
/** Get the group order of an icon. 3 groups are available by default : launchers, applis, and applets, and each group has an order.
304
#define cairo_dock_get_icon_order(icon) cairo_dock_get_group_order ((icon)->iType)
306
/** Get the type of an icon according to its content (launcher, appli, applet). This can be different from its group.
307
*@param icon the icon.
309
CairoDockIconType cairo_dock_get_icon_type (Icon *icon);
310
/** Compare 2 icons with the order relation on (group order, icon order).
311
*@param icon1 an icon.
312
*@param icon2 another icon.
313
*@return -1 if icon1 < icon2, 1 if icon1 > icon2, 0 if icon1 = icon2.
315
int cairo_dock_compare_icons_order (Icon *icon1, Icon *icon2);
317
/** Compare 2 icons with the order relation on the name (case unsensitive alphabetical order).
318
*@param icon1 an icon.
319
*@param icon2 another icon.
320
*@return -1 if icon1 < icon2, 1 if icon1 > icon2, 0 if icon1 = icon2.
322
int cairo_dock_compare_icons_name (Icon *icon1, Icon *icon2);
325
*Compare 2 icons with the order relation on the extension of their URIs (case unsensitive alphabetical order).
326
*@param icon1 an icon.
327
*@param icon2 another icon.
328
*@return -1 if icon1 < icon2, 1 if icon1 > icon2, 0 if icon1 = icon2.
330
int cairo_dock_compare_icons_extension (Icon *icon1, Icon *icon2);
332
/** Sort a list with the order relation on (group order, icon order).
333
*@param pIconList a list of icons.
334
*@return the sorted list. Elements are the same as the initial list, only their order has changed.
336
GList *cairo_dock_sort_icons_by_order (GList *pIconList);
338
/** Sort a list with the alphabetical order on the icons' name.
339
*@param pIconList a list of icons.
340
*@return the sorted list. Elements are the same as the initial list, only their order has changed. Icon's orders are updated to reflect the new order.
342
GList *cairo_dock_sort_icons_by_name (GList *pIconList);
344
/** Get the first icon of a list of icons.
345
*@param pIconList a list of icons.
346
*@return the first icon, or NULL if the list is empty.
348
Icon *cairo_dock_get_first_icon (GList *pIconList);
350
/** Get the last icon of a list of icons.
351
*@param pIconList a list of icons.
352
*@return the last icon, or NULL if the list is empty.
354
Icon *cairo_dock_get_last_icon (GList *pIconList);
357
*Renvoie la 1ere icon a etre dessinee dans un dock (qui n'est pas forcement la 1ere icon de la liste, si l'utilisateur a scrolle).
358
*@param pDock le dock.
359
*@return la 1ere icon a etre dessinee, ou NULL si la liste is vide.
361
Icon *cairo_dock_get_first_drawn_icon (CairoDock *pDock);
364
*Renvoie la derniere icon a etre dessinee dans un dock (qui n'est pas forcement la derniere icon de la liste, si l'utilisateur a scrolle).
365
*@param pDock le dock.
366
*@return la derniere icon a etre dessinee, ou NULL si la liste is vide.
368
Icon *cairo_dock_get_last_drawn_icon (CairoDock *pDock);
370
/** Get the first icon of a given group.
371
*@param pIconList a list of icons.
372
*@param iType the group of icon.
373
*@return the first found icon with this group, or NULL if none matches.
375
Icon *cairo_dock_get_first_icon_of_group (GList *pIconList, CairoDockIconType iType);
376
#define cairo_dock_get_first_icon_of_type cairo_dock_get_first_icon_of_group
378
/** Get the last icon of a given group.
379
*@param pIconList a list of icons.
380
*@param iType the group of icon.
381
*@return the last found icon with this group, or NULL if none matches.
383
Icon *cairo_dock_get_last_icon_of_group (GList *pIconList, CairoDockIconType iType);
384
#define cairo_dock_get_last_icon_of_type cairo_dock_get_last_icon_of_group
386
/** Get the first icon whose group has the same order as a given one.
387
*@param pIconList a list of icons.
388
*@param iType a type of icon.
389
*@return the first found icon, or NULL if none matches.
391
Icon* cairo_dock_get_first_icon_of_order (GList *pIconList, CairoDockIconType iType);
393
/** Get the last icon whose group has the same order as a given one.
394
*@param pIconList a list of icons.
395
*@param iType a type of icon.
396
*@return the last found icon, or NULL if none matches.
398
Icon* cairo_dock_get_last_icon_of_order (GList *pIconList, CairoDockIconType iType);
400
Icon* cairo_dock_get_last_icon_until_order (GList *pIconList, CairoDockIconType iType);
402
/** Get the currently pointed icon in a list of icons.
403
*@param pIconList a list of icons.
404
*@return the icon whose field 'bPointed' is TRUE, or NULL if none is pointed.
406
Icon *cairo_dock_get_pointed_icon (GList *pIconList);
408
/** Get the icon next to a given one. The cost is O(n).
409
*@param pIconList a list of icons.
410
*@param pIcon an icon in the list.
411
*@return the icon whose left neighboor is pIcon, or NULL if the list is empty or if pIcon is the last icon.
413
Icon *cairo_dock_get_next_icon (GList *pIconList, Icon *pIcon);
415
/** Get the icon previous to a given one. The cost is O(n).
416
*@param pIconList a list of icons.
417
*@param pIcon an icon in the list.
418
*@return the icon whose right neighboor is pIcon, or NULL if the list is empty or if pIcon is the first icon.
420
Icon *cairo_dock_get_previous_icon (GList *pIconList, Icon *pIcon);
422
/** Get the next element in a list, looping if necessary..
423
*@param ic the current element.
425
*@return the next element, or the first element of the list if 'ic' is the last one.
427
#define cairo_dock_get_next_element(ic, list) (ic == NULL || ic->next == NULL ? list : ic->next)
429
/** Get the previous element in a list, looping if necessary..
430
*@param ic the current element.
432
*@return the previous element, or the last element of the list if 'ic' is the first one.
434
#define cairo_dock_get_previous_element(ic, list) (ic == NULL || ic->prev == NULL ? g_list_last (list) : ic->prev)
436
/** Search an icon with a given command in a list of icons.
437
*@param pIconList a list of icons.
438
*@param cCommand the command.
439
*@return the first icon whose field 'cCommand' is identical to the given command, or NULL if no icon matches.
441
Icon *cairo_dock_get_icon_with_command (GList *pIconList, const gchar *cCommand);
443
/** Search an icon with a given URI in a list of icons.
444
*@param pIconList a list of icons.
445
*@param cBaseURI the URI.
446
*@return the first icon whose field 'cURI' is identical to the given URI, or NULL if no icon matches.
448
Icon *cairo_dock_get_icon_with_base_uri (GList *pIconList, const gchar *cBaseURI);
450
/** Search an icon with a given name in a list of icons.
451
*@param pIconList a list of icons.
452
*@param cName the name.
453
*@return the first icon whose field 'cName' is identical to the given name, or NULL if no icon matches.
455
Icon *cairo_dock_get_icon_with_name (GList *pIconList, const gchar *cName);
457
/** Search the icon pointing on a given sub-dock in a list of icons.
458
*@param pIconList a list of icons.
459
*@param pSubDock a sub-dock.
460
*@return the first icon whose field 'pSubDock' is equal to the given sub-dock, or NULL if no icon matches.
462
Icon *cairo_dock_get_icon_with_subdock (GList *pIconList, CairoDock *pSubDock);
464
/** Search the icon of a given module in a list of icons.
465
*@param pIconList a list of icons.
466
*@param pModule the module.
467
*@return the first icon which has an instance of the given module, or NULL if no icon matches.
469
Icon *cairo_dock_get_icon_with_module (GList *pIconList, CairoDockModule *pModule);
471
#define cairo_dock_get_first_launcher(pIconList) cairo_dock_get_first_icon_of_group (pIconList, CAIRO_DOCK_LAUNCHER)
472
#define cairo_dock_get_last_launcher(pIconList) cairo_dock_get_last_icon_of_group (pIconList, CAIRO_DOCK_LAUNCHER)
473
#define cairo_dock_get_first_appli(pIconList) cairo_dock_get_first_icon_of_group (pIconList, CAIRO_DOCK_APPLI)
474
#define cairo_dock_get_last_appli(pIconList) cairo_dock_get_last_icon_of_group (pIconList, CAIRO_DOCK_APPLI)
476
/** Get the dimension allocated to the surface/texture of an icon.
477
@param pIcon the icon.
478
@param pContainer its container.
479
@param iWidth pointer to the width.
480
@param iHeight pointer to the height.
482
void cairo_dock_get_icon_extent (Icon *pIcon, CairoContainer *pContainer, int *iWidth, int *iHeight);
484
/** Get the current size of an icon as it is seen on the screen (taking into account the zoom and the ratio).
485
@param pIcon the icon
486
@param pContainer its container
487
@param fSizeX pointer to the X size (horizontal)
488
@param fSizeY pointer to the Y size (vertical)
490
void cairo_dock_get_current_icon_size (Icon *pIcon, CairoContainer *pContainer, double *fSizeX, double *fSizeY);
492
/** Get the total zone used by an icon on its container (taking into account reflect, gap to reflect, zoom and stretching).
494
@param pContainer its container
495
@param pArea a rectangle filled with the zone used by the icon on its container.
497
void cairo_dock_compute_icon_area (Icon *icon, CairoContainer *pContainer, GdkRectangle *pArea);
501
void cairo_dock_normalize_icons_order (GList *pIconList, CairoDockIconType iType);
503
void cairo_dock_move_icon_after_icon (CairoDock *pDock, Icon *icon1, Icon *icon2);
505
/** Run an action on all the icons of a given group. The action can even destroy or remove the icon from the list.
506
*@param pIconList a list of icons.
507
*@param iType the group.
508
*@param pFuntion the callback.
509
*@param data data passed as a parameter of the callback.
510
*@return the first automatic separator with another group, or NULL if there is none.
512
Icon *cairo_dock_foreach_icons_of_type (GList *pIconList, CairoDockIconType iType, CairoDockForeachIconFunc pFuntion, gpointer data);
514
/** Update the container's name of an icon with the name of a dock. In the case of a launcher or an applet, the conf file is updated too.
515
*@param icon an icon.
516
*@param cNewParentDockName the name of its new dock.
518
void cairo_dock_update_icon_s_container_name (Icon *icon, const gchar *cNewParentDockName);
520
/** Make an icon static. Static icon are not animated when mouse hovers them.
521
*@param icon an icon.
523
#define cairo_dock_set_icon_static(icon) ((icon)->bStatic = TRUE)
525
/** Make an icon always visible, even when the dock is hidden.
526
*@param icon an icon.
527
*@param bAlwaysVisible whether the icon is always visible or not.
529
#define cairo_dock_set_icon_always_visible(icon, bAlwaysVisible) ((bAlwaysVisible)->bStatic = bAlwaysVisible)
531
/** Set the label of an icon. If it has a sub-dock, it is renamed (the name is possibly altered to stay unique). The label buffer is updated too.
532
*@param cIconName the new label of the icon. You can even pass pIcon->cName.
533
*@param pIcon the icon.
534
*@param pContainer the container of the icon.
536
void cairo_dock_set_icon_name (const gchar *cIconName, Icon *pIcon, CairoContainer *pContainer);
538
/** Same as above, but takes a printf-like format string.
539
*@param pIcon the icon.
540
*@param pContainer the container of the icon.
541
*@param cIconNameFormat the new label of the icon, in a 'printf' way.
542
*@param ... data to be inserted into the string.
544
void cairo_dock_set_icon_name_printf (Icon *pIcon, CairoContainer *pContainer, const gchar *cIconNameFormat, ...) G_GNUC_PRINTF (3, 4);
546
/** Set the quick-info of an icon. This is a small text (a few characters) that is superimposed on the icon.
547
*@param pIcon the icon.
548
*@param pContainer the container of the icon.
549
*@param cQuickInfo the text of the quick-info.
551
void cairo_dock_set_quick_info (Icon *pIcon, CairoContainer *pContainer, const gchar *cQuickInfo);
553
/** Same as above, but takes a printf-like format string.
554
*@param pIcon the icon.
555
*@param pContainer the container of the icon.
556
*@param cQuickInfoFormat the text of the quick-info, in a 'printf' way.
557
*@param ... data to be inserted into the string.
559
void cairo_dock_set_quick_info_printf (Icon *pIcon, CairoContainer *pContainer, const gchar *cQuickInfoFormat, ...) G_GNUC_PRINTF (3, 4);
561
/** Clear the quick-info of an icon.
562
*@param pIcon the icon.
564
#define cairo_dock_remove_quick_info(pIcon) cairo_dock_set_quick_info (pIcon, NULL, NULL)
566
/** Updates which launcher is attached/detached to/from the dock, according to the current desktop.
567
*@param pDock the dock whose icons are to be considered.
569
void cairo_dock_hide_show_launchers_on_other_desktops (CairoDock *pDock);