* Changes in the autotools stuff affecting a lot of platform dependent
[modest] / src / maemo / modest-hildon-includes.h
index 03a66f3..6dd1306 100644 (file)
@@ -58,8 +58,7 @@ k * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 #include <hildon/hildon-notification.h>
 #endif /*MODEST_HILDON_NOTIFY*/
 
-
-#ifdef MODEST_HAVE_HILDON0_WIDGETS
+#if MODEST_HILDON_API == 0
 #include <hildon-widgets/hildon-color-selector.h>
 #include <hildon-widgets/hildon-color-button.h>
 #include <hildon-widgets/hildon-banner.h>
@@ -70,11 +69,12 @@ k * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 #include <hildon-widgets/hildon-font-selection-dialog.h>
 #include <hildon-widgets/hildon-find-toolbar.h>
 #include <hildon-widgets/hildon-sort-dialog.h>
+#include <hildon-widgets/hildon-program.h>
 
 #else
 
-#ifdef MODEST_HAVE_HILDON1_WIDGETS
-
+#if MODEST_HILDON_API >= 1
+#include <hildon/hildon-helper.h>
 #include <hildon/hildon-file-chooser-dialog.h>
 #include <hildon/hildon-color-chooser.h>
 #include <hildon/hildon-banner.h>
@@ -86,8 +86,71 @@ k * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 #include <hildon/hildon-find-toolbar.h>
 #include <hildon/hildon-sort-dialog.h>
 #include <hildon/hildon-number-editor.h>
+#include <hildon/hildon-program.h>
 
 #endif /*__MODEST_HAVE_HILDON1_WIDGETS*/
 #endif /*__MODEST_HAVE_HILDON0_WIDGETS_*/
 
+
+/* backward compatibility... */
+#ifdef MODEST_HAVE_OSSO_MIME
+#define hildon_mime_open_file_with_mime_type osso_mime_open_file_with_mime_type 
+#define hildon_mime_open_file                osso_mime_open_file                
+
+#define HildonURIAction                      OssoURIAction
+#define hildon_uri_get_scheme_from_uri       osso_uri_get_scheme_from_uri
+#define hildon_uri_get_actions               osso_uri_get_actions
+#define hildon_uri_get_actions_by_uri        osso_uri_get_actions_by_uri
+#define hildon_uri_action_get_translation    osso_uri_action_get_translation   
+#define hildon_uri_is_default_action         osso_uri_is_default_action
+#define hildon_uri_free_actions              osso_uri_free_actions
+
+/* service->name */
+#define hildon_uri_action_get_service        osso_uri_action_get_name
+#define hildon_uri_open                      osso_uri_open
+
+#define hildon_mime_get_icon_names           osso_mime_get_icon_names 
+#endif /*MODEST_HAVE_OSSO_MIME*/
+
+/* helplib to use */
+#ifdef MODEST_HAVE_OSSO_HELP
+#define hildon_help_show               ossohelp_show
+#define hildon_help_dialog_help_enable ossohelp_dialog_help_enable
+#define HILDON_HELP_SHOW_DIALOG        OSSO_HELP_SHOW_DIALOG
+#else
+#ifdef MODEST_HAVE_HILDON_HELP
+/* nothing */
+#endif /*MODEST_HAVE_HILDON_HELP*/
+#endif /*MODEST_HAVE_OSSO_HELP*/
+
+/* some extra #defines, so it will compile with the 'normal' gtk */
+#ifndef MODEST_HAVE_HILDON_GTK
+#define hildon_gtk_entry_set_input_mode(a,b) \
+       g_warning ("%s: hildon_gtk_entry_set_input_mode requires gtk-hildon", __FUNCTION__)
+#define hildon_gtk_text_view_set_input_mode(a,b) \
+       g_warning ("%s: hildon_gtk_text_view_set_input_mode requires gtk-hildon", __FUNCTION__)
+#define gtk_widget_tap_and_hold_setup(a,b,c,d)                         \
+       g_warning ("%s: gtk_widget_tap_and_hold_setup requires gtk-hildon", __FUNCTION__)
+
+typedef enum
+{
+  GTK_INVALID_INPUT_MAX_CHARS_REACHED,
+  GTK_INVALID_INPUT_MODE_RESTRICTION
+} GtkInvalidInputType;
+
+typedef enum
+{
+  HILDON_GTK_INPUT_MODE_ALPHA        = 1 << 0,
+  HILDON_GTK_INPUT_MODE_NUMERIC      = 1 << 1,
+  HILDON_GTK_INPUT_MODE_SPECIAL      = 1 << 2,
+  HILDON_GTK_INPUT_MODE_HEXA         = 1 << 3,
+  HILDON_GTK_INPUT_MODE_TELE         = 1 << 4,
+  HILDON_GTK_INPUT_MODE_FULL         = (HILDON_GTK_INPUT_MODE_ALPHA | HILDON_GTK_INPUT_MODE_NUMERIC | HILDON_GTK_INPUT_MODE_SPECIAL),
+  HILDON_GTK_INPUT_MODE_MULTILINE    = 1 << 28,
+  HILDON_GTK_INPUT_MODE_INVISIBLE    = 1 << 29,
+  HILDON_GTK_INPUT_MODE_AUTOCAP      = 1 << 30,
+  HILDON_GTK_INPUT_MODE_DICTIONARY   = 1 << 31
+} HildonGtkInputMode;
+#endif /* !MODEST_HAVE_HILDON_GTK */
+
 #endif /*__MODEST_HILDON_INCLUDES__*/