X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fhildon2%2Fmodest-maemo-utils.h;h=71d909bae20303c0cb3bc088083131de3a6ff805;hb=e0411b467e3de20f6ea60957e370a15d1dae2f27;hp=cb5a71fa449838725867d14f379b23e9632b3bf1;hpb=51372832576ac3b1423ee599cc5b142aabdebd42;p=modest diff --git a/src/hildon2/modest-maemo-utils.h b/src/hildon2/modest-maemo-utils.h index cb5a71f..71d909b 100644 --- a/src/hildon2/modest-maemo-utils.h +++ b/src/hildon2/modest-maemo-utils.h @@ -37,8 +37,10 @@ #include #include "widgets/modest-global-settings-dialog.h" #include "widgets/modest-validating-entry.h" +#include +#include -#define MODEST_MAEMO_UTILS_MYDOCS_FOLDER "MyDocs" +#define MODEST_MAEMO_UTILS_MYDOCS_ENV "MYDOCSDIR" #define MODEST_MAEMO_UTILS_DEFAULT_IMAGE_FOLDER ".images" @@ -74,15 +76,6 @@ void modest_maemo_utils_setup_images_filechooser (GtkFileChooser *chooser); osso_context_t *modest_maemo_utils_get_osso_context (void); /** - * modest_maemo_open_mcc_mapping_file: - * - * open the mcc mapping file, or NULL if it fails - * - * Returns: file ptr or NULL in case of error - */ -FILE* modest_maemo_open_mcc_mapping_file (void); - -/** * modest_maemo_set_thumbable_scrollbar: * @win: a scrollable window * @thumbable: set it to thumbable (TRUE) or small (FALSE) @@ -123,15 +116,77 @@ void modest_maemo_utils_set_osso_context (osso_context_t *osso_context); */ GtkWidget *modest_maemo_utils_get_manager_menubar_as_menu (GtkUIManager *manager, const gchar *item_name); -GtkWidget *modest_maemo_utils_create_captioned (GtkSizeGroup *group, - const gchar *label_text, +GtkWidget *modest_maemo_utils_create_captioned (GtkSizeGroup *title_size_group, + GtkSizeGroup *value_size_group, + const gchar *title, + gboolean use_markup, GtkWidget *control); -void -modest_maemo_utils_create_picker_layout (GtkSizeGroup *sizegroup, - const gchar *label, - GtkWidget *picker); +GtkWidget *modest_maemo_utils_create_captioned_with_size_type (GtkSizeGroup *title_size_group, + GtkSizeGroup *value_size_group, + const gchar *title, + gboolean use_markup, + GtkWidget *control, + HildonSizeType size_type); + +void modest_maemo_utils_captioned_set_label (GtkWidget *captioned, + const gchar *new_label, + gboolean use_markup); + +GtkWidget *modest_maemo_utils_captioned_get_label_widget (GtkWidget *captioned); + +void modest_maemo_utils_set_hbutton_layout (GtkSizeGroup *title_sizegroup, + GtkSizeGroup *value_sizegroup, + const gchar *title, + GtkWidget *button); +void modest_maemo_utils_set_vbutton_layout (GtkSizeGroup *sizegroup, + const gchar *title, + GtkWidget *button); GtkWidget *modest_maemo_utils_create_group_box (const gchar *label, GtkWidget *contents); +gboolean modest_maemo_utils_select_attachments (GtkWindow *window, TnyList *att_list, gboolean include_msgs); + +#ifdef MODEST_PLATFORM_MAEMO +/** + * modest_maemo_utils_in_usb_mode: + * + * Check if the device is working in mass storage mode + * + * Returns: returns TRUE if the internal memory of the device is + * working in mass storage mode + **/ +gboolean modest_maemo_utils_in_usb_mode (); +#endif + +/** + * modest_maemo_utils_scroll_pannable: + * @pannable: a #HildonPannableArea + * @horizontal: the amount to scroll in horizontal direction + * @vertical: the amount to scroll in vertical direction + * + * Performs some scrolling over a pannable area. The amount of + * scrolling is expressed in step_increments of the pannable area + * GtkAdjustments + **/ +void +modest_maemo_utils_scroll_pannable(HildonPannableArea *pannable, + gint horizontal, + gint vertical); + +/** + * modest_heartbeat_add: + * @function: function to call + * @userdata: data to pass to @function. + * + * Adds a function to be called when heartbeat is called. If the + * function returns FALSE it is automatically removed from the + * list of event sources and will not be called again. + * + * Returns: the ID (greater than 0) of the event source + */ +guint +modest_heartbeat_add (GSourceFunc function, + gpointer userdata); + #endif /*__MODEST_MAEMO_UTILS_H__*/