![]() |
![]() |
![]() |
hildon-extras Reference Manual | ![]() |
---|---|---|---|---|
he-tz-chooserhe-tz-chooser — Function definitions for the closed HildonTimeZoneChooser |
typedef HildonTimeZoneChooser; enum FeedbackDialogResponse; HildonTimeZoneChooser* hildon_time_zone_chooser_new (void); FeedbackDialogResponse hildon_time_zone_chooser_run (HildonTimeZoneChooser *chooser); void hildon_time_zone_chooser_set_city (HildonTimeZoneChooser *chooser, Cityinfo *cityinfo); Cityinfo* hildon_time_zone_chooser_get_city (HildonTimeZoneChooser *chooser); void hildon_time_zone_chooser_free (HildonTimeZoneChooser *chooser);
HildonTimeZoneChooser is a closed widget in Maemo 5, with no headers currently available. HildonTimeZoneChooser, used in the Clock application, features a pannable map of the world, along with a button in its EditToolbar to allow you to input the name of a city directly.
Note: Function defs. for the HildonPannableMap widget are still not available.
Example 2. Basic program
void create_he_tz_instance (void) { Citytime *home_loc = clock_get_home_location (); HildonTimeZoneChooser* time_chooser = hildon_time_zone_chooser_new ();; hildon_time_zone_chooser_set_city (time_chooser, home_loc->city); switch (hildon_time_zone_chooser_run (time_chooser)) { case FEEDBACK_DIALOG_RESPONSE_CITY_CHOSEN: break; case FEEDBACK_DIALOG_RESPONSE_CANCELLED: g_assert_not_reached (); } Cityinfo *time_chooser_time = hildon_time_zone_chooser_get_city (time_chooser); g_printf ("%s\n", cityinfo_get_zone (time_chooser_time)); cityinfo_free (time_chooser_time); clock_citytime_free (home_loc); hildon_time_zone_chooser_free (time_chooser); }
typedef enum { FEEDBACK_DIALOG_RESPONSE_CITY_CHOSEN = 1, FEEDBACK_DIALOG_RESPONSE_CANCELLED } FeedbackDialogResponse;
HildonTimeZoneChooser* hildon_time_zone_chooser_new (void);
Returns : | A new HildonTimeZoneChooser instance, or NULL . Free with hildon_time_zone_chooser_free() .
|
FeedbackDialogResponse hildon_time_zone_chooser_run (HildonTimeZoneChooser *chooser);
Display the HildonTimeZoneChooser.
chooser : |
A HildonTimeZoneChooser instance. |
Returns : | A value in the FeedbackDialogResponse enum. |
void hildon_time_zone_chooser_set_city (HildonTimeZoneChooser *chooser, Cityinfo *cityinfo);
Sets the city to be displayed in the HildonTimeZoneChooser.
chooser : |
A HildonTimeZoneChooser instance. |
cityinfo : |
A Cityinfo instance. |
Cityinfo* hildon_time_zone_chooser_get_city (HildonTimeZoneChooser *chooser);
Gets the currently displayed city in the HildonTimeZoneChooser.
chooser : |
A HildonTimeZoneChooser instance. |
Returns : | A newly-allocated Cityinfo instance. Free with cityinfo_free() .
|
void hildon_time_zone_chooser_free (HildonTimeZoneChooser *chooser);
Frees the allocated HildonTimeZoneChooser instance returned from hildon_time_zone_chooser_new()
.
chooser : |
A HildonTimeZoneChooser instance. |