* sometimes, the text->html conversion screwed up, because
[modest] / src / maemo / modest-maemo-utils.h
index ff13926..d8ce63d 100644 (file)
 #define __MODEST_MAEMO_UTILS_H__
 
 #include <gtk/gtk.h>
+#include <stdio.h> /* for FILE* */
+#include <modest-protocol-info.h>
+#include <tny-fs-stream.h>
+#include <libosso.h>
 
-/**
- * modest_maemo_utils_menubar_to_menu:
- * @ui_manager: a ui manager, with the menubar at "/MenuBar" 
- * 
- * convert a menubar description (in a GtkUIManager) in to a menu
- * 
- * Returns: a new menu, or NULL in case of error
- */
-GtkWidget*    modest_maemo_utils_menubar_to_menu (GtkUIManager *ui_manager);
+
+#define MODEST_MAEMO_UTILS_MYDOCS_FOLDER "MyDocs"
+#define MODEST_MAEMO_UTILS_DEFAULT_IMAGE_FOLDER ".images"
 
 
 /**
@@ -55,34 +53,74 @@ GtkWidget*    modest_maemo_utils_menubar_to_menu (GtkUIManager *ui_manager);
  */
 void modest_maemo_utils_get_device_name (void);
 
+
+/**
+ * modest_maemo_utils_setup_images_filechooser:
+ * @chooser: a #GtkFileChooser
+ *
+ * Configures the default folder, and mime filter of a filechooser
+ * for images.
+ */
+void modest_maemo_utils_setup_images_filechooser (GtkFileChooser *chooser);
+
+
+/**
+ * modest_maemo_utils_get_osso_context:
+ *
+ * get the osso_context pointer for this application
+ * 
+ * Return: the osso context pointer 
+ */
+osso_context_t *modest_maemo_utils_get_osso_context (void);
+
 /**
- * modest_maemo_utils_folder_writable:
- * @filename: a string
+ * modest_maemo_open_mcc_mapping_file:
  *
- * Checks if @filename is in a writable folder
+ * open the mcc mapping file, or NULL if it fails
  *
- * Returns: %TRUE if @filename is writable, %FALSE otherwise
+ * Returns: file ptr or NULL in case of error
  */
-gboolean modest_maemo_utils_folder_writable (const gchar *filename);
+FILE* modest_maemo_open_mcc_mapping_file (void);
 
 /**
- * modest_maemo_utils_file_exists:
- * @filename: a string
+ * modest_maemo_set_thumbable_scrollbar:
+ * @win: a scrollable window
+ * @thumbable: set it to thumbable (TRUE) or small (FALSE)
  *
- * Checks if @filename exists
+ * changes the thumbability of scrollbars in a scrollable window
+ */
+void modest_maemo_set_thumbable_scrollbar (GtkScrolledWindow *win, gboolean thumbable);
+
+
+/**
+ * modest_maemo_get_osso_context:
  *
- * Returns: %TRUE if @filename currently exists, %FALSE otherwise
+ * retrieve the osso context for this application
+ * 
+ * Returns: the current osso_context_t ptr  
+ */
+osso_context_t* modest_maemo_utils_get_osso_context (void);
+
+/**
+ * modest_maemo_set_osso_context:
+ *
+ * remember the osso-context for this application 
+ * 
+ * @osso_context: a valid osso_context_t pointer
+ *  
  */
-gboolean modest_maemo_utils_file_exists (const gchar *filename);
+void modest_maemo_utils_set_osso_context (osso_context_t *osso_context);
 
 /**
- * modest_maemo_utils_create_temp_stream:
- * @path: a string with the created file path
+ * modest_maemo_utils_get_manager_menubar_as_menu:
+ * @manager: a #GtkUIManager
+ * @item_name: a string
  *
- * Creates a temporary fs stream 
+ * obtains the node with name @item_name in @manager (which happens to be a menubar) as a
+ * #GtkMenu.
  *
- * Returns: a #TnyFsStream, or %NULL if operation failed.
+ * Returns: a #GtkMenu
  */
-TnyFsStream *modest_maemo_utils_create_temp_stream (gchar **path);
+GtkWidget *modest_maemo_utils_get_manager_menubar_as_menu (GtkUIManager *manager, const gchar *item_name);
 
 #endif /*__MODEST_MAEMO_UTILS_H__*/