44
44
if (! cairo_dock_reserve_data_slot (myApplet))
47
cairo_dock_register_notification (CAIRO_DOCK_ENTER_ICON, (CairoDockNotificationFunc) cd_animations_on_enter, CAIRO_DOCK_RUN_AFTER, NULL);
48
cairo_dock_register_notification (CAIRO_DOCK_CLICK_ICON, (CairoDockNotificationFunc) cd_animations_on_click, CAIRO_DOCK_RUN_FIRST, NULL);
49
cairo_dock_register_notification (CAIRO_DOCK_REQUEST_ICON_ANIMATION, (CairoDockNotificationFunc) cd_animations_on_request, CAIRO_DOCK_RUN_FIRST, NULL);
50
cairo_dock_register_notification (CAIRO_DOCK_UPDATE_ICON, (CairoDockNotificationFunc) cd_animations_update_icon , CAIRO_DOCK_RUN_AFTER, NULL);
51
cairo_dock_register_notification (CAIRO_DOCK_RENDER_ICON, (CairoDockNotificationFunc) cd_animations_render_icon, CAIRO_DOCK_RUN_FIRST, NULL);
52
cairo_dock_register_notification (CAIRO_DOCK_RENDER_ICON, (CairoDockNotificationFunc) cd_animations_post_render_icon, CAIRO_DOCK_RUN_AFTER, NULL);
53
cairo_dock_register_notification (CAIRO_DOCK_STOP_ICON, (CairoDockNotificationFunc) cd_animations_free_data, CAIRO_DOCK_RUN_AFTER, NULL);
54
cairo_dock_register_notification (CAIRO_DOCK_UNFOLD_SUBDOCK, (CairoDockNotificationFunc) cd_animations_unfold_subdock, CAIRO_DOCK_RUN_AFTER, NULL);
47
cairo_dock_register_notification_on_object (&myContainersMgr,
48
NOTIFICATION_ENTER_ICON,
49
(CairoDockNotificationFunc) cd_animations_on_enter,
50
CAIRO_DOCK_RUN_AFTER, NULL);
51
cairo_dock_register_notification_on_object (&myContainersMgr,
52
NOTIFICATION_CLICK_ICON,
53
(CairoDockNotificationFunc) cd_animations_on_click,
54
CAIRO_DOCK_RUN_FIRST, NULL);
55
cairo_dock_register_notification_on_object (&myIconsMgr,
56
NOTIFICATION_REQUEST_ICON_ANIMATION,
57
(CairoDockNotificationFunc) cd_animations_on_request,
58
CAIRO_DOCK_RUN_FIRST, NULL);
59
cairo_dock_register_notification_on_object (&myIconsMgr,
60
NOTIFICATION_UPDATE_ICON,
61
(CairoDockNotificationFunc) cd_animations_update_icon,
62
CAIRO_DOCK_RUN_AFTER, NULL);
63
cairo_dock_register_notification_on_object (&myIconsMgr,
64
NOTIFICATION_RENDER_ICON,
65
(CairoDockNotificationFunc) cd_animations_render_icon,
66
CAIRO_DOCK_RUN_FIRST, NULL);
67
cairo_dock_register_notification_on_object (&myIconsMgr,
68
NOTIFICATION_RENDER_ICON,
69
(CairoDockNotificationFunc) cd_animations_post_render_icon,
70
CAIRO_DOCK_RUN_AFTER, NULL);
71
cairo_dock_register_notification_on_object (&myIconsMgr,
72
NOTIFICATION_STOP_ICON,
73
(CairoDockNotificationFunc) cd_animations_free_data,
74
CAIRO_DOCK_RUN_AFTER, NULL);
75
cairo_dock_register_notification_on_object (&myIconsMgr,
76
NOTIFICATION_UNFOLD_SUBDOCK,
77
(CairoDockNotificationFunc) cd_animations_unfold_subdock,
78
CAIRO_DOCK_RUN_AFTER, NULL);
56
80
myData.iAnimationID[CD_ANIMATIONS_BOUNCE] = cairo_dock_register_animation ("bounce", D_("Bounce"), FALSE);
57
81
myData.iAnimationID[CD_ANIMATIONS_ROTATE] = cairo_dock_register_animation ("rotate", D_("Rotate"), FALSE);
72
93
//\___________ Here is where you stop your applet. myConfig and myData are still valid, but will be reseted to 0 at the end of the function. In the end, your applet will go back to its original state, as if it had never been activated.
73
94
CD_APPLET_STOP_BEGIN
74
cairo_dock_remove_notification_func (CAIRO_DOCK_ENTER_ICON, (CairoDockNotificationFunc) cd_animations_on_enter, NULL);
75
cairo_dock_remove_notification_func (CAIRO_DOCK_CLICK_ICON, (CairoDockNotificationFunc) cd_animations_on_click, NULL);
76
cairo_dock_remove_notification_func (CAIRO_DOCK_REQUEST_ICON_ANIMATION, (CairoDockNotificationFunc) cd_animations_on_request, NULL);
77
cairo_dock_remove_notification_func (CAIRO_DOCK_UPDATE_ICON, (CairoDockNotificationFunc) cd_animations_update_icon, NULL);
78
cairo_dock_remove_notification_func (CAIRO_DOCK_RENDER_ICON, (CairoDockNotificationFunc) cd_animations_render_icon, NULL);
79
cairo_dock_remove_notification_func (CAIRO_DOCK_RENDER_ICON, (CairoDockNotificationFunc) cd_animations_post_render_icon, NULL);
80
cairo_dock_remove_notification_func (CAIRO_DOCK_STOP_ICON, (CairoDockNotificationFunc) cd_animations_free_data, NULL);
81
cairo_dock_remove_notification_func (CAIRO_DOCK_UNFOLD_SUBDOCK, (CairoDockNotificationFunc) cd_animations_unfold_subdock, NULL);
95
cairo_dock_remove_notification_func_on_object (&myContainersMgr,
96
NOTIFICATION_ENTER_ICON,
97
(CairoDockNotificationFunc) cd_animations_on_enter, NULL);
98
cairo_dock_remove_notification_func_on_object (&myContainersMgr,
99
NOTIFICATION_CLICK_ICON,
100
(CairoDockNotificationFunc) cd_animations_on_click, NULL);
101
cairo_dock_remove_notification_func_on_object (&myIconsMgr,
102
NOTIFICATION_REQUEST_ICON_ANIMATION,
103
(CairoDockNotificationFunc) cd_animations_on_request, NULL);
104
cairo_dock_remove_notification_func_on_object (&myIconsMgr,
105
NOTIFICATION_UPDATE_ICON,
106
(CairoDockNotificationFunc) cd_animations_update_icon, NULL);
107
cairo_dock_remove_notification_func_on_object (&myIconsMgr,
108
NOTIFICATION_RENDER_ICON,
109
(CairoDockNotificationFunc) cd_animations_render_icon, NULL);
110
cairo_dock_remove_notification_func_on_object (&myIconsMgr,
111
NOTIFICATION_RENDER_ICON,
112
(CairoDockNotificationFunc) cd_animations_post_render_icon, NULL);
113
cairo_dock_remove_notification_func_on_object (&myIconsMgr,
114
NOTIFICATION_STOP_ICON,
115
(CairoDockNotificationFunc) cd_animations_free_data, NULL);
116
cairo_dock_remove_notification_func_on_object (&myIconsMgr,
117
NOTIFICATION_UNFOLD_SUBDOCK,
118
(CairoDockNotificationFunc) cd_animations_unfold_subdock, NULL);
83
120
cairo_dock_unregister_animation ("bounce");
84
121
cairo_dock_unregister_animation ("rotate");