|
Cairo-Dock 2.4.0~1
|
Defines | |
| #define | cairo_dock_remove_dialog_if_any(icon) |
Enumerations | |
| enum | CairoDialogNotifications { NOTIFICATION_UPDATE_DIALOG, NOTIFICATION_UPDATE_DIALOG_SLOW, NOTIFICATION_RENDER_DIALOG } |
| signals More... | |
Functions | |
| gboolean | cairo_dock_dialog_reference (CairoDialog *pDialog) |
| gboolean | cairo_dock_dialog_unreference (CairoDialog *pDialog) |
| gboolean | cairo_dock_remove_dialog_if_any_full (Icon *icon, gboolean bAll) |
| CairoDialog * | cairo_dock_build_dialog (CairoDialogAttribute *pAttribute, Icon *pIcon, CairoContainer *pContainer) |
| CairoDialog * | cairo_dock_show_dialog_full (const gchar *cText, Icon *pIcon, CairoContainer *pContainer, double fTimeLength, const gchar *cIconPath, GtkWidget *pInteractiveWidget, CairoDockActionOnAnswerFunc pActionFunc, gpointer data, GFreeFunc pFreeDataFunc) |
| CairoDialog * | cairo_dock_show_temporary_dialog_with_icon_printf (const gchar *cText, Icon *pIcon, CairoContainer *pContainer, double fTimeLength, const gchar *cIconPath,...) G_GNUC_PRINTF(1 |
| CairoDialog *CairoDialog | cairo_dock_show_temporary_dialog_with_icon (const gchar *cText, Icon *pIcon, CairoContainer *pContainer, double fTimeLength, const gchar *cIconPath) |
| CairoDialog * | cairo_dock_show_temporary_dialog (const gchar *cText, Icon *pIcon, CairoContainer *pContainer, double fTimeLength) |
| CairoDialog * | cairo_dock_show_temporary_dialog_with_default_icon (const gchar *cText, Icon *pIcon, CairoContainer *pContainer, double fTimeLength) |
| CairoDialog * | cairo_dock_show_dialog_with_question (const gchar *cText, Icon *pIcon, CairoContainer *pContainer, const gchar *cIconPath, CairoDockActionOnAnswerFunc pActionFunc, gpointer data, GFreeFunc pFreeDataFunc) |
| CairoDialog * | cairo_dock_show_dialog_with_entry (const gchar *cText, Icon *pIcon, CairoContainer *pContainer, const gchar *cIconPath, const gchar *cTextForEntry, CairoDockActionOnAnswerFunc pActionFunc, gpointer data, GFreeFunc pFreeDataFunc) |
| CairoDialog * | cairo_dock_show_dialog_with_value (const gchar *cText, Icon *pIcon, CairoContainer *pContainer, const gchar *cIconPath, double fValue, double fMaxValue, CairoDockActionOnAnswerFunc pActionFunc, gpointer data, GFreeFunc pFreeDataFunc) |
| int | cairo_dock_show_dialog_and_wait (const gchar *cText, Icon *pIcon, CairoContainer *pContainer, double fTimeLength, const gchar *cIconPath, GtkWidget *pInteractiveWidget) |
| gchar * | cairo_dock_show_demand_and_wait (const gchar *cMessage, Icon *pIcon, CairoContainer *pContainer, const gchar *cInitialAnswer) |
| double | cairo_dock_show_value_and_wait (const gchar *cMessage, Icon *pIcon, CairoContainer *pContainer, double fInitialValue, double fMaxValue) |
| int | cairo_dock_ask_question_and_wait (const gchar *cQuestion, Icon *pIcon, CairoContainer *pContainer) |
| gboolean | cairo_dock_icon_has_dialog (Icon *pIcon) |
| Icon * | cairo_dock_get_dialogless_icon_full (CairoDock *pDock) |
| CairoDialog * | cairo_dock_show_general_message (const gchar *cMessage, double fTimeLength) |
| int | cairo_dock_ask_general_question_and_wait (const gchar *cQuestion) |
| void | cairo_dock_hide_dialog (CairoDialog *pDialog) |
| void | cairo_dock_unhide_dialog (CairoDialog *pDialog) |
| void | cairo_dock_toggle_dialog_visibility (CairoDialog *pDialog) |
This class manages the Dialogs, that are useful to bring interaction with the user.
With dialogs, you can pop-up messages, ask for question, etc. Any GTK widget can be embedded inside a dialog, giving you any possible interaction with the user.
Dialogs are constructed with a set of attributes grouped inside a _CairoDialogAttribute. See cairo-dock-dialog-factory.h for the list of available attributes.
The most generic way to build a Dialog is to fill a _CairoDialogAttribute and pass it to cairo_dock_build_dialog.
But in most of case, you can just use one of the following convenient functions, that will do the job for you.
| #define cairo_dock_remove_dialog_if_any | ( | icon | ) |
Unreference all the dialogs pointing on an icon.
| icon | the icon you want to delete all dialogs from. |
| gboolean cairo_dock_dialog_reference | ( | CairoDialog * | pDialog | ) |
Increase by 1 the reference of a dialog. Use cairo_dock_dialog_unreference when you're done, so that the dialog can be destroyed.
| pDialog | the dialog. |
| gboolean cairo_dock_dialog_unreference | ( | CairoDialog * | pDialog | ) |
Decrease by 1 the reference of a dialog. If the reference becomes nul, the dialog is destroyed.
| pDialog | the dialog. |
| gboolean cairo_dock_remove_dialog_if_any_full | ( | Icon * | icon, |
| gboolean | bAll | ||
| ) |
Unreference the dialogs pointing on an icon.
| icon | the icon you want to delete all dialogs from. |
| bAll | whether all dialogs should be removed or only the one that don't have interaction with the user. |
| CairoDialog* cairo_dock_build_dialog | ( | CairoDialogAttribute * | pAttribute, |
| Icon * | pIcon, | ||
| CairoContainer * | pContainer | ||
| ) |
Generic function to pop up a dialog.
| pAttribute | attributes of the dialog. |
| pIcon | the icon that will hold the dialog. |
| pContainer | the container of the icon. |
| CairoDialog* cairo_dock_show_dialog_full | ( | const gchar * | cText, |
| Icon * | pIcon, | ||
| CairoContainer * | pContainer, | ||
| double | fTimeLength, | ||
| const gchar * | cIconPath, | ||
| GtkWidget * | pInteractiveWidget, | ||
| CairoDockActionOnAnswerFunc | pActionFunc, | ||
| gpointer | data, | ||
| GFreeFunc | pFreeDataFunc | ||
| ) |
Pop up a dialog with a message, a widget, 2 buttons ok/cancel and an icon, all optionnal.
| cText | the message to display. |
| pIcon | the icon that will hold the dialog. |
| pContainer | the container of the icon. |
| fTimeLength | the duration of the dialog (in ms), or 0 for an unlimited dialog. |
| cIconPath | path to an icon to display in the margin. |
| pInteractiveWidget | a GTK widget; It is destroyed with the dialog. Use 'gtk_widget_reparent()' before if you want to keep it alive, or use cairo_dock_show_dialog_and_wait. |
| pActionFunc | the callback called when the user makes its choice. NULL means there will be no buttons. |
| data | data passed as a parameter of the callback. |
| pFreeDataFunc | function used to free the data when the dialog is destroyed, or NULL if unnecessary. |
| CairoDialog* cairo_dock_show_temporary_dialog_with_icon_printf | ( | const gchar * | cText, |
| Icon * | pIcon, | ||
| CairoContainer * | pContainer, | ||
| double | fTimeLength, | ||
| const gchar * | cIconPath, | ||
| ... | |||
| ) |
Pop up a dialog with a message, and a limited duration, and an icon in the margin.
| cText | the message to display. |
| pIcon | the icon that will hold the dialog. |
| pContainer | the container of the icon. |
| fTimeLength | the duration of the dialog (in ms), or 0 for an unlimited dialog. |
| cIconPath | path to an icon. |
| ... | arguments to insert in the message, in a printf way. |
| CairoDialog* CairoDialog cairo_dock_show_temporary_dialog_with_icon | ( | const gchar * | cText, |
| Icon * | pIcon, | ||
| CairoContainer * | pContainer, | ||
| double | fTimeLength, | ||
| const gchar * | cIconPath | ||
| ) |
Pop up a dialog with a message, and a limited duration, and an icon in the margin.
| cText | the message to display. |
| pIcon | the icon that will hold the dialog. |
| pContainer | the container of the icon. |
| fTimeLength | the duration of the dialog (in ms), or 0 for an unlimited dialog. |
| cIconPath | path to an icon. |
| CairoDialog* cairo_dock_show_temporary_dialog | ( | const gchar * | cText, |
| Icon * | pIcon, | ||
| CairoContainer * | pContainer, | ||
| double | fTimeLength | ||
| ) |
Pop up a dialog with a message, and a limited duration, with no icon.
| cText | the message to display. |
| pIcon | the icon that will hold the dialog. |
| pContainer | the container of the icon. |
| fTimeLength | the duration of the dialog (in ms), or 0 for an unlimited dialog. |
| CairoDialog* cairo_dock_show_temporary_dialog_with_default_icon | ( | const gchar * | cText, |
| Icon * | pIcon, | ||
| CairoContainer * | pContainer, | ||
| double | fTimeLength | ||
| ) |
Pop up a dialog with a message, and a limited duration, and a default icon.
| cText | the format of the message to display. |
| pIcon | the icon that will hold the dialog. |
| pContainer | the container of the icon. |
| fTimeLength | the duration of the dialog (in ms), or 0 for an unlimited dialog. |
| CairoDialog* cairo_dock_show_dialog_with_question | ( | const gchar * | cText, |
| Icon * | pIcon, | ||
| CairoContainer * | pContainer, | ||
| const gchar * | cIconPath, | ||
| CairoDockActionOnAnswerFunc | pActionFunc, | ||
| gpointer | data, | ||
| GFreeFunc | pFreeDataFunc | ||
| ) |
Pop up a dialog with a question and 2 buttons ok/cancel. The dialog is unreferenced after the user has answered, so if you want to keep it alive, you have to reference it in the callback.
| cText | the message to display. |
| pIcon | the icon that will hold the dialog. |
| pContainer | the container of the icon. |
| cIconPath | path to an icon to display in the margin. |
| pActionFunc | the callback. |
| data | data passed as a parameter of the callback. |
| pFreeDataFunc | function used to free the data. |
| CairoDialog* cairo_dock_show_dialog_with_entry | ( | const gchar * | cText, |
| Icon * | pIcon, | ||
| CairoContainer * | pContainer, | ||
| const gchar * | cIconPath, | ||
| const gchar * | cTextForEntry, | ||
| CairoDockActionOnAnswerFunc | pActionFunc, | ||
| gpointer | data, | ||
| GFreeFunc | pFreeDataFunc | ||
| ) |
Pop up a dialog with a text entry and 2 buttons ok/cancel. The dialog is unreferenced after the user has answered, so if you want to keep it alive, you have to reference it in the callback.
| cText | the message to display. |
| pIcon | the icon that will hold the dialog. |
| pContainer | the container of the icon. |
| cIconPath | path to an icon to display in the margin. |
| cTextForEntry | text to display initially in the entry. |
| pActionFunc | the callback. |
| data | data passed as a parameter of the callback. |
| pFreeDataFunc | function used to free the data. |
| CairoDialog* cairo_dock_show_dialog_with_value | ( | const gchar * | cText, |
| Icon * | pIcon, | ||
| CairoContainer * | pContainer, | ||
| const gchar * | cIconPath, | ||
| double | fValue, | ||
| double | fMaxValue, | ||
| CairoDockActionOnAnswerFunc | pActionFunc, | ||
| gpointer | data, | ||
| GFreeFunc | pFreeDataFunc | ||
| ) |
Pop up a dialog with an horizontal scale between 0 and fMaxValue and 2 buttons ok/cancel. The dialog is unreferenced after the user has answered, so if you want to keep it alive, you have to reference it in the callback.
| cText | the message to display. |
| pIcon | the icon that will hold the dialog. |
| pContainer | the container of the icon. |
| cIconPath | path to an icon to display in the margin. |
| fValue | initial value of the scale. |
| fMaxValue | maximum value of the scale. |
| pActionFunc | the callback. |
| data | data passed as a parameter of the callback. |
| pFreeDataFunc | function used to free the data. |
| int cairo_dock_show_dialog_and_wait | ( | const gchar * | cText, |
| Icon * | pIcon, | ||
| CairoContainer * | pContainer, | ||
| double | fTimeLength, | ||
| const gchar * | cIconPath, | ||
| GtkWidget * | pInteractiveWidget | ||
| ) |
Pop up a dialog with GTK widget and 2 buttons ok/cancel, and block until the user makes its choice.
| cText | the message to display. |
| pIcon | the icon that will hold the dialog. |
| pContainer | the container of the icon. |
| fTimeLength | time length of the dialog, or 0 for an unlimited dialog. |
| cIconPath | path to an icon to display in the margin. |
| pInteractiveWidget | an interactive widget. |
| gchar* cairo_dock_show_demand_and_wait | ( | const gchar * | cMessage, |
| Icon * | pIcon, | ||
| CairoContainer * | pContainer, | ||
| const gchar * | cInitialAnswer | ||
| ) |
Pop up a dialog with a text entry, and 2 buttons ok/cancel, and block until the user makes its choice.
| cMessage | the message to display. |
| pIcon | the icon that will hold the dialog. |
| pContainer | the container of the icon. |
| cInitialAnswer | the initial value of the entry (can be NULL). |
| double cairo_dock_show_value_and_wait | ( | const gchar * | cMessage, |
| Icon * | pIcon, | ||
| CairoContainer * | pContainer, | ||
| double | fInitialValue, | ||
| double | fMaxValue | ||
| ) |
Pop up a dialog with an horizontal scale between 0 and fMaxValue, and 2 buttons ok/cancel, and block until the user makes its choice.
| cMessage | the message to display. |
| pIcon | the icon that will hold the dialog. |
| pContainer | the container of the icon. |
| fInitialValue | the initial value of the scale. |
| fMaxValue | the maximum value of the scale. |
| int cairo_dock_ask_question_and_wait | ( | const gchar * | cQuestion, |
| Icon * | pIcon, | ||
| CairoContainer * | pContainer | ||
| ) |
Pop up a dialog with a question and 2 buttons yes/no, and block until the user makes its choice.
| cQuestion | the question to ask. |
| pIcon | the icon that will hold the dialog. |
| pContainer | the container of the icon. |
| gboolean cairo_dock_icon_has_dialog | ( | Icon * | pIcon | ) |
Test if an icon has at least one dialog.
| pIcon | the icon. |
Search the "the best icon possible" for a Dock to hold a general dialog.
| pDock | a dock (NULL to search inside the main dock). |
| CairoDialog* cairo_dock_show_general_message | ( | const gchar * | cMessage, |
| double | fTimeLength | ||
| ) |
Pop up a dialog, pointing on "the best icon possible". This allows to display a general message.
| cMessage | the message. |
| fTimeLength | life time of the dialog, in ms. |
| int cairo_dock_ask_general_question_and_wait | ( | const gchar * | cQuestion | ) |
Pop up a dialog, pointing on "the best icon possible", and wait. This allows to display a general message.
| cQuestion | the message. |
| void cairo_dock_hide_dialog | ( | CairoDialog * | pDialog | ) |
Hide a dialog.
| pDialog | the dialog. |
| void cairo_dock_unhide_dialog | ( | CairoDialog * | pDialog | ) |
Show a dialog and give it focus.
| pDialog | the dialog. |
| void cairo_dock_toggle_dialog_visibility | ( | CairoDialog * | pDialog | ) |
Toggle the visibility of a dialog.
| pDialog | the dialog. |