Cairo-Dock
3.4.0
|
Data Structures | |
struct | _CairoDockTransition |
Transitions are an easy way to set an animation on an Icon to make it change from a state to another. More... | |
struct | _CairoDockHidingEffect |
Definition of a Hiding Effect backend (used to provide an animation when the docks hides/shows itself). More... | |
Macros | |
#define | cairo_dock_container_is_animating(pContainer) |
#define | cairo_dock_animation_will_be_visible(pDock) |
#define | gldi_icon_stop_animation(pIcon) |
#define | cairo_dock_get_animation_delta_t(pContainer) |
#define | cairo_dock_get_slow_animation_delta_t(pContainer) |
#define | cairo_dock_has_transition(pIcon) |
#define | cairo_dock_get_transition_count(pIcon) |
#define | cairo_dock_get_transition_elapsed_time(pIcon) |
#define | cairo_dock_get_transition_fraction(pIcon) |
Typedefs | |
typedef gboolean(* | CairoDockTransitionRenderFunc )(Icon *pIcon, gpointer pUserData) |
callback to render the icon with libcairo at each step of the Transition. | |
typedef gboolean(* | CairoDockTransitionGLRenderFunc )(Icon *pIcon, gpointer pUserData) |
callback to render the icon with OpenGL at each step of the Transition. | |
Functions | |
void | cairo_dock_pop_up (CairoDock *pDock) |
void | cairo_dock_pop_down (CairoDock *pDock) |
void | cairo_dock_launch_animation (GldiContainer *pContainer) |
void | gldi_icon_start_animation (Icon *icon) |
void | gldi_icon_request_animation (Icon *pIcon, const gchar *cAnimation, int iNbRounds) |
void | gldi_icon_request_attention (Icon *pIcon, const gchar *cAnimation, int iNbRounds) |
void | gldi_icon_stop_attention (Icon *pIcon) |
void | cairo_dock_trigger_icon_removal_from_dock (Icon *pIcon) |
void | cairo_dock_set_transition_on_icon (Icon *pIcon, GldiContainer *pContainer, CairoDockTransitionRenderFunc render_step_cairo, CairoDockTransitionGLRenderFunc render_step_opengl, gboolean bFastPace, gint iDuration, gboolean bRemoveWhenFinished, gpointer pUserData, GFreeFunc pFreeUserDataFunc) |
void | cairo_dock_remove_transition_on_icon (Icon *pIcon) |
This class handles the icons and containers animations. Each container has a rendering loop. An iteration of this loop is separated in 2 phases : the update of each element of the container and of the container itself, and the redraw of each element and of the container itself. The loop has 2 possible frequencies : fast (~33Hz) and slow (~10Hz), to optimize the CPU load according to the needs of the animation. To be called on each iteration of the loop, you register to the CAIRO_DOCK_UPDATE_X or CAIRO_DOCK_UPDATE_X_SLOW, where X is either ICON, DOCK, DESKLET, DIALOG or FLYING_CONTAINER. If you need to draw things directly on the container, you register to CAIRO_DOCK_RENDER_X, where X is either ICON, DOCK, DESKLET, DIALOG or FLYING_CONTAINER.
#define cairo_dock_container_is_animating | ( | pContainer | ) |
Say if a container is currently animated.
pContainer | a Container |
#define cairo_dock_animation_will_be_visible | ( | pDock | ) |
Say if it's usefull to launch an animation on a Dock (indeed, it's useless to launch it if it will be invisible).
pDock | the Dock to animate. |
#define gldi_icon_stop_animation | ( | pIcon | ) |
Stop any animation on an Icon, except the disappearance/appearance animation.
pIcon | the icon |
#define cairo_dock_get_animation_delta_t | ( | pContainer | ) |
Get the interval of time between 2 iterations of the fast loop (in ms).
pContainer | the container. |
#define cairo_dock_get_slow_animation_delta_t | ( | pContainer | ) |
Get the interval of time between 2 iterations of the slow loop (in ms).
pContainer | the container. |
#define cairo_dock_has_transition | ( | pIcon | ) |
Say if an Icon has a Transition.
pIcon | the icon. |
#define cairo_dock_get_transition_count | ( | pIcon | ) |
Get the the elpased number of steps since the beginning of the transition.
pIcon | the icon. |
#define cairo_dock_get_transition_elapsed_time | ( | pIcon | ) |
Get the elapsed time (in ms) since the beginning of the transition.
pIcon | the icon. |
#define cairo_dock_get_transition_fraction | ( | pIcon | ) |
Get the percentage of the elapsed time (between 0 and 1) since the beginning of the transition, if the transition has a fixed duration (otherwise 0).
pIcon | the icon. |
void cairo_dock_pop_up | ( | CairoDock * | pDock | ) |
Pop up a Dock above other windows, if it is in mode "keep below other windows"; otherwise do nothing.
pDock | the dock. |
void cairo_dock_pop_down | ( | CairoDock * | pDock | ) |
Pop down a Dock below other windows, if it is in mode "keep below other windows"; otherwise do nothing.
pDock | the dock. |
void cairo_dock_launch_animation | ( | GldiContainer * | pContainer | ) |
Launch the animation of a Container.
pContainer | the container to animate. |
void gldi_icon_start_animation | ( | Icon * | icon | ) |
Start the animation of an Icon. Do nothing if the icon is at rest or if the animation won't be visible.
icon | the icon to animate. |
void gldi_icon_request_animation | ( | Icon * | pIcon, |
const gchar * | cAnimation, | ||
int | iNbRounds | ||
) |
Launch a given animation on an Icon. Do nothing if the icon will not be animated or if the animation doesn't exist.
pIcon | the icon to animate. |
cAnimation | name of the animation. |
iNbRounds | number of rounds the animation will be played. |
void gldi_icon_request_attention | ( | Icon * | pIcon, |
const gchar * | cAnimation, | ||
int | iNbRounds | ||
) |
Launch an animation that will draw the user's attention (ie, the icon will be visible even if the dock is hidden or even if it's in a sub-dock).
pIcon | the icon |
cAnimation | an animation name, or NULL or "default" to use the default attention animation |
iNbRounds | number of rounds, or <= 0 for an endles animation |
void gldi_icon_stop_attention | ( | Icon * | pIcon | ) |
Stop the icon from drawing the attention. If the icon is not drawing the attention, do nothing.
pIcon | the icon |
void cairo_dock_trigger_icon_removal_from_dock | ( | Icon * | pIcon | ) |
Trigger the removal of an Icon from its Dock. The icon will effectively be removed at the end of the animation. If the icon is not inside a dock, nothing happens.
pIcon | the icon to remove |
void cairo_dock_set_transition_on_icon | ( | Icon * | pIcon, |
GldiContainer * | pContainer, | ||
CairoDockTransitionRenderFunc | render_step_cairo, | ||
CairoDockTransitionGLRenderFunc | render_step_opengl, | ||
gboolean | bFastPace, | ||
gint | iDuration, | ||
gboolean | bRemoveWhenFinished, | ||
gpointer | pUserData, | ||
GFreeFunc | pFreeUserDataFunc | ||
) |
Set a Transition on an Icon.
pIcon | the icon. |
pContainer | the Container of the Icon. It will be shared with the transition. |
render_step_cairo | the cairo rendering function. |
render_step_opengl | the openGL rendering function (can be NULL, in which case the texture mapping from the cairo drawing is done automatically). |
bFastPace | TRUE for a high frequency refresh (this uses of course more CPU). |
iDuration | duration if the transition, in ms. Can be 0 for an endless transition, in which case you can stop the transition with cairo_dock_remove_transition_on_icon. |
bRemoveWhenFinished | TRUE to destroy and remove the transition when it is finished. |
pUserData | data passed to the rendering functions. |
pFreeUserDataFunc | function called to free the user data when the transition is destroyed (optionnal). |
void cairo_dock_remove_transition_on_icon | ( | Icon * | pIcon | ) |
Stop and remove the Transition of an Icon.
pIcon | the icon. |