Logo Search packages:      
Sourcecode: cairo-dock version File versions

cairo-dock-applet-facility.h File Reference


Detailed Description

Les macros forment un canevas dedie aux applets. Elles permettent un developpement rapide et normalise d'une applet pour Cairo-Dock.

Pour un exemple tres simple, consultez les sources de l'applet 'logout'.

Definition in file cairo-dock-applet-facility.h.

#include "cairo-dock-struct.h"

Go to the source code of this file.

Classes

struct  CairoDockMeasure

Defines

#define _D   D_
#define cairo_dock_remove_quick_info(pIcon)   cairo_dock_set_quick_info (NULL, NULL, pIcon, 1)
#define cairo_dock_set_icon_surface(pIconContext, pSurface)   cairo_dock_set_icon_surface_full (pIconContext, pSurface, 1, 1, NULL, NULL)
#define CD_APPLET_ABOUT(cMessage)
#define CD_APPLET_ABOUT_H   void about (GtkMenuItem *menu_item, gpointer *data);
#define CD_APPLET_ADD_ABOUT_IN_MENU(pMenu)   CD_APPLET_ADD_IN_MENU (_("About"), about, pMenu)
#define CD_APPLET_ADD_IN_MENU(cLabel, pFunction, pMenu)   CD_APPLET_ADD_IN_MENU_WITH_DATA(cLabel, pFunction, pMenu, NULL)
#define CD_APPLET_ADD_IN_MENU_WITH_DATA(cLabel, pFunction, pMenu, pData)
#define CD_APPLET_ADD_IN_MENU_WITH_STOCK(cLabel, gtkStock, pFunction, pMenu, pData)
#define CD_APPLET_ADD_SEPARATOR()
#define CD_APPLET_ADD_SUB_MENU(cLabel, pSubMenu, pMenu)
#define CD_APPLET_ALT_CLICK   (iButtonState & GDK_MOD1_MASK)
#define CD_APPLET_ANIMATE_MY_ICON(iAnimationType, iAnimationLength)   cairo_dock_animate_icon (myIcon, myDock, iAnimationType, iAnimationLength);
#define CD_APPLET_CLICKED_CONTAINER   pClickedContainer
#define CD_APPLET_CLICKED_ICON   pClickedIcon
#define CD_APPLET_CONFIG_H
#define CD_APPLET_CREATE_AND_ADD_SUB_MENU(cLabel, pMenu)   cairo_dock_create_sub_menu (cLabel, pMenu);
#define CD_APPLET_CTRL_CLICK   (iButtonState & GDK_CONTROL_MASK)
#define CD_APPLET_DEFINITION(cName, iMajorVersion, iMinorVersion, iMicroVersion, iAppletCategory)
#define CD_APPLET_GET_CONFIG_BEGIN
#define CD_APPLET_GET_CONFIG_END
#define CD_APPLET_H
#define CD_APPLET_INCLUDE_MY_VARS
#define CD_APPLET_INIT_BEGIN(erreur)
#define CD_APPLET_INIT_END
#define CD_APPLET_LAST_ITEM_IN_MENU   pMenuItem
#define CD_APPLET_LOAD_SURFACE_FOR_MY_APPLET(cImagePath)   cairo_dock_create_surface_for_icon (cImagePath, myDrawContext, myIcon->fWidth * (myDock ? (1 + g_fAmplitude) / myDock->fRatio : 1), myIcon->fHeight* (myDock ? (1 + g_fAmplitude) / myDock->fRatio : 1));
#define CD_APPLET_MY_CONF_FILE   cConfFilePath
#define CD_APPLET_MY_CONFIG_CHANGED   (pKeyFile != NULL)
#define CD_APPLET_MY_CONTAINER_TYPE_CHANGED   bContainerTypeChanged
#define CD_APPLET_MY_KEY_FILE   pKeyFile
#define CD_APPLET_MY_MENU   pAppletMenu
#define CD_APPLET_MY_OLD_CONTAINER   pOldContainer;
#define CD_APPLET_ON_BUILD_MENU   applet_on_build_menu
#define CD_APPLET_ON_BUILD_MENU_BEGIN
#define CD_APPLET_ON_BUILD_MENU_END
#define CD_APPLET_ON_BUILD_MENU_H   gboolean CD_APPLET_ON_BUILD_MENU (gpointer *data);
#define CD_APPLET_ON_CLICK   action_on_click
#define CD_APPLET_ON_CLICK_BEGIN
#define CD_APPLET_ON_CLICK_END
#define CD_APPLET_ON_CLICK_H   gboolean CD_APPLET_ON_CLICK (gpointer *data);
#define CD_APPLET_ON_DROP_DATA   action_on_drop_data
#define CD_APPLET_ON_DROP_DATA_BEGIN
#define CD_APPLET_ON_DROP_DATA_END
#define CD_APPLET_ON_DROP_DATA_H   gboolean CD_APPLET_ON_DROP_DATA (gpointer *data);
#define CD_APPLET_ON_MIDDLE_CLICK   action_on_middle_click
#define CD_APPLET_ON_MIDDLE_CLICK_BEGIN
#define CD_APPLET_ON_MIDDLE_CLICK_END
#define CD_APPLET_ON_MIDDLE_CLICK_H   gboolean CD_APPLET_ON_MIDDLE_CLICK (gpointer *data);
#define CD_APPLET_ON_SCROLL   action_on_scroll
#define CD_APPLET_ON_SCROLL_BEGIN
#define CD_APPLET_ON_SCROLL_END
#define CD_APPLET_ON_SCROLL_H   gboolean CD_APPLET_ON_SCROLL (gpointer *data);
#define CD_APPLET_PRE_INIT_BEGIN(cName, iMajorVersion, iMinorVersion, iMicroVersion, iAppletCategory)
#define CD_APPLET_PRE_INIT_END
#define CD_APPLET_RECEIVED_DATA   cReceivedData
#define CD_APPLET_REDRAW_MY_ICON   cairo_dock_redraw_my_icon (myIcon, myContainer);
#define CD_APPLET_REGISTER_FOR_BUILD_MENU_EVENT   cairo_dock_register_notification (CAIRO_DOCK_BUILD_MENU, (CairoDockNotificationFunc) CD_APPLET_ON_BUILD_MENU, CAIRO_DOCK_RUN_FIRST);
#define CD_APPLET_REGISTER_FOR_CLICK_EVENT   cairo_dock_register_notification (CAIRO_DOCK_CLICK_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_CLICK, CAIRO_DOCK_RUN_FIRST);
#define CD_APPLET_REGISTER_FOR_DROP_DATA_EVENT   cairo_dock_register_notification (CAIRO_DOCK_DROP_DATA, (CairoDockNotificationFunc) CD_APPLET_ON_DROP_DATA, CAIRO_DOCK_RUN_FIRST);
#define CD_APPLET_REGISTER_FOR_MIDDLE_CLICK_EVENT   cairo_dock_register_notification (CAIRO_DOCK_MIDDLE_CLICK_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_MIDDLE_CLICK, CAIRO_DOCK_RUN_FIRST);
#define CD_APPLET_REGISTER_FOR_SCROLL_EVENT   cairo_dock_register_notification (CAIRO_DOCK_SCROLL_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_SCROLL, CAIRO_DOCK_RUN_FIRST);
#define CD_APPLET_RELOAD_BEGIN
#define CD_APPLET_RELOAD_END
#define CD_APPLET_RESET_CONFIG_BEGIN
#define CD_APPLET_RESET_CONFIG_END
#define CD_APPLET_RESET_DATA_BEGIN
#define CD_APPLET_RESET_DATA_END
#define CD_APPLET_SCROLL_DIRECTION   iDirection
#define CD_APPLET_SCROLL_DOWN   (CD_APPLET_SCROLL_DIRECTION == GDK_SCROLL_DOWN)
#define CD_APPLET_SCROLL_UP   (CD_APPLET_SCROLL_DIRECTION == GDK_SCROLL_UP)
#define CD_APPLET_SET_DESKLET_RENDERER(cRendererName)   CD_APPLET_SET_DESKLET_RENDERER_WITH_DATA (cRendererName, NULL)
#define CD_APPLET_SET_DESKLET_RENDERER_WITH_DATA(cRendererName, pConfig)
#define CD_APPLET_SET_HOURS_MINUTES_AS_QUICK_INFO(iTimeInSeconds)   cairo_dock_set_hours_minutes_as_quick_info (myDrawContext, myIcon, myContainer, iTimeInSeconds);
#define CD_APPLET_SET_IMAGE_ON_MY_ICON(cImagePath)
#define CD_APPLET_SET_LOCAL_IMAGE_ON_MY_ICON(cImageName)
#define CD_APPLET_SET_MINUTES_SECONDES_AS_QUICK_INFO(iTimeInSeconds)   cairo_dock_set_minutes_secondes_as_quick_info (myDrawContext, myIcon, myContainer, iTimeInSeconds);
#define CD_APPLET_SET_NAME_FOR_MY_ICON(cIconName)   cairo_dock_set_icon_name (myDrawContext, cIconName, myIcon, myContainer);
#define CD_APPLET_SET_NAME_FOR_MY_ICON_PRINTF(cIconNameFormat,...)   cairo_dock_set_icon_name_full (myDrawContext, myIcon, myContainer, cIconNameFormat, ##__VA_ARGS__);
#define CD_APPLET_SET_QUICK_INFO_ON_MY_ICON(cQuickInfo)   cairo_dock_set_quick_info (myDrawContext, cQuickInfo, myIcon, myDock ? (1 + g_fAmplitude) / 1 : 1);
#define CD_APPLET_SET_QUICK_INFO_ON_MY_ICON_PRINTF(cQuickInfoFormat,...)   cairo_dock_set_quick_info_full (myDrawContext, myIcon, myContainer, cQuickInfoFormat, ##__VA_ARGS__);
#define CD_APPLET_SET_SIZE_AS_QUICK_INFO(iSizeInBytes)   cairo_dock_set_size_as_quick_info (myDrawContext, myIcon, myContainer, iSizeInBytes);
#define CD_APPLET_SET_SURFACE_ON_MY_ICON(pSurface)
#define CD_APPLET_SET_SURFACE_ON_MY_ICON_WITH_ALPHA(pSurface, fAlpha)
#define CD_APPLET_SET_SURFACE_ON_MY_ICON_WITH_BAR(pSurface, fValue)
#define CD_APPLET_SET_SURFACE_ON_MY_ICON_WITH_ZOOM(pSurface, fScale)
#define CD_APPLET_SET_USER_IMAGE_ON_MY_ICON(cUserImageName, cDefaultLocalImageName)
#define CD_APPLET_SET_ZOOMED_SURFACE_ON_MY_ICON(pSurface, fScale)
#define CD_APPLET_SHIFT_CLICK   (iButtonState & GDK_SHIFT_MASK)
#define CD_APPLET_STOP_BEGIN
#define CD_APPLET_STOP_END
#define CD_APPLET_UNREGISTER_FOR_BUILD_MENU_EVENT   cairo_dock_remove_notification_func (CAIRO_DOCK_BUILD_MENU, (CairoDockNotificationFunc) CD_APPLET_ON_BUILD_MENU);
#define CD_APPLET_UNREGISTER_FOR_CLICK_EVENT   cairo_dock_remove_notification_func (CAIRO_DOCK_CLICK_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_CLICK);
#define CD_APPLET_UNREGISTER_FOR_DROP_DATA_EVENT   cairo_dock_remove_notification_func (CAIRO_DOCK_DROP_DATA, (CairoDockNotificationFunc) CD_APPLET_ON_DROP_DATA);
#define CD_APPLET_UNREGISTER_FOR_MIDDLE_CLICK_EVENT   cairo_dock_remove_notification_func (CAIRO_DOCK_MIDDLE_CLICK_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_MIDDLE_CLICK);
#define CD_APPLET_UNREGISTER_FOR_SCROLL_EVENT   cairo_dock_remove_notification_func (CAIRO_DOCK_SCROLL_ICON, (CairoDockNotificationFunc) CD_APPLET_ON_SCROLL);
#define CD_CONFIG_GET_ANIMATION(cGroupName, cKeyName)   CD_CONFIG_GET_ANIMATION_WITH_DEFAULT(cGroupName, cKeyName, CAIRO_DOCK_BOUNCE)
#define CD_CONFIG_GET_ANIMATION_WITH_DEFAULT(cGroupName, cKeyName, iDefaultAnimation)   cairo_dock_get_animation_type_key_value (pKeyFile, cGroupName, cKeyName, &bFlushConfFileNeeded, iDefaultAnimation, NULL, NULL);
#define CD_CONFIG_GET_BOOLEAN(cGroupName, cKeyName)   CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT (cGroupName, cKeyName, TRUE)
#define CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT(cGroupName, cKeyName, bDefaultValue)   cairo_dock_get_boolean_key_value (pKeyFile, cGroupName, cKeyName, &bFlushConfFileNeeded, bDefaultValue, NULL, NULL)
#define CD_CONFIG_GET_COLOR(cGroupName, cKeyName, pColorBuffer)   CD_CONFIG_GET_COLOR_WITH_DEFAULT(cGroupName, cKeyName, pColorBuffer, NULL)
#define CD_CONFIG_GET_COLOR_RVB(cGroupName, cKeyName, pColorBuffer)   CD_CONFIG_GET_COLOR_RVB_WITH_DEFAULT(cGroupName, cKeyName, pColorBuffer, NULL)
#define CD_CONFIG_GET_COLOR_RVB_WITH_DEFAULT(cGroupName, cKeyName, pColorBuffer, pDefaultColor)   cairo_dock_get_double_list_key_value (pKeyFile, cGroupName, cKeyName, &bFlushConfFileNeeded, pColorBuffer, 3, pDefaultColor, NULL, NULL);
#define CD_CONFIG_GET_COLOR_WITH_DEFAULT(cGroupName, cKeyName, pColorBuffer, pDefaultColor)   cairo_dock_get_double_list_key_value (pKeyFile, cGroupName, cKeyName, &bFlushConfFileNeeded, pColorBuffer, 4, pDefaultColor, NULL, NULL);
#define CD_CONFIG_GET_DOUBLE(cGroupName, cKeyName)   CD_CONFIG_GET_DOUBLE_WITH_DEFAULT (cGroupName, cKeyName, 0.)
#define CD_CONFIG_GET_DOUBLE_WITH_DEFAULT(cGroupName, cKeyName, fDefaultValue)   cairo_dock_get_double_key_value (pKeyFile, cGroupName, cKeyName, &bFlushConfFileNeeded, 0., NULL, NULL)
#define CD_CONFIG_GET_INTEGER(cGroupName, cKeyName)   CD_CONFIG_GET_INTEGER_WITH_DEFAULT (cGroupName, cKeyName, 0)
#define CD_CONFIG_GET_INTEGER_WITH_DEFAULT(cGroupName, cKeyName, iDefaultValue)   cairo_dock_get_integer_key_value (pKeyFile, cGroupName, cKeyName, &bFlushConfFileNeeded, iDefaultValue, NULL, NULL)
#define CD_CONFIG_GET_STRING(cGroupName, cKeyName)   CD_CONFIG_GET_STRING_WITH_DEFAULT (cGroupName, cKeyName, NULL)
#define CD_CONFIG_GET_STRING_LIST(cGroupName, cKeyName, length)   CD_CONFIG_GET_STRING_LIST_WITH_DEFAULT(cGroupName, cKeyName, length, NULL)
#define CD_CONFIG_GET_STRING_LIST_WITH_DEFAULT(cGroupName, cKeyName, length, cDefaultValues)   cairo_dock_get_string_list_key_value (pKeyFile, cGroupName, cKeyName, &bFlushConfFileNeeded, length, cDefaultValues, NULL, NULL)
#define CD_CONFIG_GET_STRING_WITH_DEFAULT(cGroupName, cKeyName, cDefaultValue)   cairo_dock_get_string_key_value (pKeyFile, cGroupName, cKeyName, &bFlushConfFileNeeded, cDefaultValue, NULL, NULL)
#define CD_CONFIG_GET_THEME_PATH(cGroupName, cKeyName, cThemesDirName, cDefaultThemeName)   cairo_dock_manage_themes_for_applet (MY_APPLET_SHARE_DATA_DIR, cThemesDirName, CD_APPLET_MY_CONF_FILE, pKeyFile, cGroupName, cKeyName, &bFlushConfFileNeeded, cDefaultThemeName)
#define D_(message)   dgettext (MY_APPLET_GETTEXT_DOMAIN, message)

Enumerations

enum  CairoDockFrequencyState {
  CAIRO_DOCK_FREQUENCY_NORMAL = 0, CAIRO_DOCK_FREQUENCY_LOW, CAIRO_DOCK_FREQUENCY_VERY_LOW, CAIRO_DOCK_FREQUENCY_SLEEP,
  CAIRO_DOCK_NB_FREQUENCIES
}
enum  CairoDockInfoDisplay { CAIRO_DOCK_INFO_NONE = 0, CAIRO_DOCK_INFO_ON_ICON, CAIRO_DOCK_INFO_ON_LABEL, CAIRO_DOCK_NB_INFO_DISPLAY }

Functions

void cairo_dock_add_reflection_to_icon (cairo_t *pIconContext, Icon *pIcon, CairoContainer *pContainer)
void cairo_dock_animate_icon (Icon *pIcon, CairoDock *pDock, CairoDockAnimationType iAnimationType, int iNbRounds)
void cairo_dock_change_measure_frequency (CairoDockMeasure *pMeasureTimer, int iNewCheckInterval)
gchar * cairo_dock_check_conf_file_exists (gchar *cUserDataDirName, gchar *cShareDataDir, gchar *cConfFileName)
GtkWidget * cairo_dock_create_sub_menu (gchar *cLabel, GtkWidget *pMenu)
void cairo_dock_downgrade_frequency_state (CairoDockMeasure *pMeasureTimer)
void cairo_dock_draw_bar_on_icon (cairo_t *pIconContext, double fValue, Icon *pIcon, CairoContainer *pContainer)
void cairo_dock_free_measure_timer (CairoDockMeasure *pMeasureTimer)
void cairo_dock_free_minimal_config (CairoDockMinimalAppletConfig *pMinimalConfig)
void cairo_dock_launch_measure (CairoDockMeasure *pMeasureTimer)
gchar * cairo_dock_manage_themes_for_applet (gchar *cAppletShareDataDir, gchar *cThemeDirName, gchar *cAppletConfFilePath, GKeyFile *pKeyFile, gchar *cGroupName, gchar *cKeyName, gboolean *bFlushConfFileNeeded, gchar *cDefaultThemeName)
gboolean cairo_dock_measure_is_active (CairoDockMeasure *pMeasureTimer)
CairoDockMeasure * cairo_dock_new_measure_timer (int iCheckInterval, GVoidFunc acquisition, GVoidFunc read, GVoidFunc update)
void cairo_dock_relaunch_measure_immediately (CairoDockMeasure *pMeasureTimer, int iNewCheckInterval)
void cairo_dock_set_hours_minutes_as_quick_info (cairo_t *pSourceContext, Icon *pIcon, CairoContainer *pContainer, int iTimeInSeconds)
void cairo_dock_set_icon_name (cairo_t *pSourceContext, const gchar *cIconName, Icon *pIcon, CairoContainer *pContainer)
void cairo_dock_set_icon_name_full (cairo_t *pSourceContext, Icon *pIcon, CairoContainer *pContainer, const gchar *cIconNameFormat,...)
void cairo_dock_set_icon_surface_full (cairo_t *pIconContext, cairo_surface_t *pSurface, double fScale, double fAlpha, Icon *pIcon, CairoContainer *pContainer)
void cairo_dock_set_icon_surface_with_reflect (cairo_t *pIconContext, cairo_surface_t *pSurface, Icon *pIcon, CairoContainer *pContainer)
void cairo_dock_set_image_on_icon (cairo_t *pIconContext, gchar *cImagePath, Icon *pIcon, CairoContainer *pContainer)
void cairo_dock_set_minutes_secondes_as_quick_info (cairo_t *pSourceContext, Icon *pIcon, CairoContainer *pContainer, int iTimeInSeconds)
void cairo_dock_set_normal_frequency_state (CairoDockMeasure *pMeasureTimer)
void cairo_dock_set_quick_info (cairo_t *pSourceContext, const gchar *cQuickInfo, Icon *pIcon, double fMaxScale)
void cairo_dock_set_quick_info_full (cairo_t *pSourceContext, Icon *pIcon, CairoContainer *pContainer, const gchar *cQuickInfoFormat,...)
void cairo_dock_set_size_as_quick_info (cairo_t *pSourceContext, Icon *pIcon, CairoContainer *pContainer, long long int iSizeInBytes)
void cairo_dock_stop_measure_timer (CairoDockMeasure *pMeasureTimer)


Generated by  Doxygen 1.6.0   Back to index