X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmaemo%2Fmodest-hildon-includes.h;h=6dd1306eb6f51fda900b15114a46fb73a145528a;hb=a588a7c8d674282d264542e1e989577b1df787e0;hp=36c05779ef9f8933d1aeb684cc38048bcc7f7550;hpb=5f129e7e4cd0aad32c4d35a7a4b2f29a0058d11d;p=modest diff --git a/src/maemo/modest-hildon-includes.h b/src/maemo/modest-hildon-includes.h index 36c0577..6dd1306 100644 --- a/src/maemo/modest-hildon-includes.h +++ b/src/maemo/modest-hildon-includes.h @@ -33,9 +33,32 @@ k * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, #include #endif -#ifdef MODEST_HILDON_VERSION_0 +/* helplib to use */ +#ifdef MODEST_HAVE_OSSO_HELP +#include +#else +#ifdef MODEST_HAVE_HILDON_HELP +#include +#endif /*MODEST_HAVE_HILDON_HELP*/ +#endif /*MODEST_HAVE_OSSO_HELP*/ + +/* mimelib to use */ +#ifdef MODEST_HAVE_OSSO_MIME #include #include +#else +#ifdef MODEST_HAVE_HILDON_MIME +#include +#include +#endif /*MODEST_HAVE_HILDON_MIME*/ +#endif /*MODEST_HAVE_OSSO_MIME*/ + + +#ifdef MODEST_HAVE_HILDON_NOTIFY +#include +#endif /*MODEST_HILDON_NOTIFY*/ + +#if MODEST_HILDON_API == 0 #include #include #include @@ -45,9 +68,13 @@ k * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, #include #include #include +#include +#include + #else -#include -#include + +#if MODEST_HILDON_API >= 1 +#include #include #include #include @@ -57,8 +84,73 @@ k * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, #include #include #include +#include #include -#endif /* MODEST_HILDON_VERSION_0*/ +#include + +#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__*/