AlpTimeZoneSelector
[UI Widgets]


Data Structures

struct  _AlpTimeZoneLocInfo
struct  _AlpTimeZoneSelector
struct  _AlpTimeZoneSelectorClass

Notification

#define ALP_NOTIFY_EVENT_TIMEZONE_CHANGE_TZ   "alp/timezone/change/tz"
 The notification is broadcast after any timezone is added/removed/renamed in TimezoneSelector.

Defines

#define ALP_IS_TIMEZONE_SELECTOR(obj)   (G_TYPE_CHECK_INSTANCE_TYPE((obj), ALP_TYPE_TIMEZONE_SELECTOR))
#define ALP_IS_TIMEZONE_SELECTOR_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass), ALP_TYPE_TIMEZONE_SELECTOR))
#define ALP_STATUS_TIMEZONE_API   (ALP_CLASS_TIMEZONE | 0x00020000)
#define ALP_STATUS_TIMEZONE_DML   (ALP_CLASS_TIMEZONE | 0x00010000)
#define ALP_STATUS_TZ_API_BAD_PARAM   (ALP_STATUS_TIMEZONE_API | 0x00000100)
#define ALP_STATUS_TZ_API_NO_LOCATION   (ALP_STATUS_TIMEZONE_API | 0x00000200)
#define ALP_STATUS_TZ_API_NO_ZONE   (ALP_STATUS_TIMEZONE_API | 0x00000300)
#define ALP_STATUS_TZ_DML_BAD_PARAM   (ALP_STATUS_TIMEZONE_DML | 0x00000100)
#define ALP_STATUS_TZ_DML_CORRUPT   (ALP_STATUS_TIMEZONE_DML | 0x00000800)
#define ALP_STATUS_TZ_DML_DATABASE_ERROR   (ALP_STATUS_TIMEZONE_DML | 0x00000600)
#define ALP_STATUS_TZ_DML_DUPLICATE   (ALP_STATUS_TIMEZONE_DML | 0x00000700)
#define ALP_STATUS_TZ_DML_EXISTS   (ALP_STATUS_TIMEZONE_DML | 0x00000900)
#define ALP_STATUS_TZ_DML_INTERNAL_ERROR   (ALP_STATUS_TIMEZONE_DML | 0x00000300)
#define ALP_STATUS_TZ_DML_INVALID_LUID   (ALP_STATUS_TIMEZONE_DML | 0x00000500)
#define ALP_STATUS_TZ_DML_NO_MEMORY   (ALP_STATUS_TIMEZONE_DML | 0x00000200)
#define ALP_STATUS_TZ_DML_NO_RECORDS   (ALP_STATUS_TIMEZONE_DML | 0x00000400)
#define ALP_TIMEZONE_SELECTOR(obj)   (G_TYPE_CHECK_INSTANCE_CAST((obj), ALP_TYPE_TIMEZONE_SELECTOR, AlpTimeZoneSelector))
#define ALP_TIMEZONE_SELECTOR_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST((klass), ALP_TYPE_TIMEZONE_SELECTOR, AlpTimeZoneSelectorClass))
#define ALP_TIMEZONE_SELECTOR_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), ALP_TYPE_TIMEZONE_SELECTOR, AlpTimeZoneSelectorClass))
#define ALP_TYPE_TIMEZONE_SELECTOR   (alp_timezone_selector_get_type())

Typedefs

typedef _AlpTimeZoneLocInfo AlpTimeZoneLocInfo
 The internal location type.
typedef _AlpTimeZoneSelector AlpTimeZoneSelector
typedef _AlpTimeZoneSelectorClass AlpTimeZoneSelectorClass

Functions

alp_status_t alp_timezone_dml_get_sys_location_tz (const gchar *location, gchar **zone)
 Retrieves the corresponding timezone of the specified location from the system timezone database.
alp_status_t alp_timezone_dml_get_sys_tz_location (const gchar *zone, gchar **location)
 Retrieves the corresponding location of the specified timezone from the system timezone database.
alp_status_t alp_timezone_dml_get_user_tz_locations (const gchar *zone, GList **locations_list)
 get the list of locations associated with the specified timezone in the user timezone database. You must free the list values with g_free() and the list with g_list_free() when you are done.
alp_status_t alp_timezone_selector_dml_get_infos (GPtrArray **informations)
 Retrieves all of the default user locations, zones, latitudes, and longitudes from the timezone database.
alp_status_t alp_timezone_selector_dml_get_loc_info (const gchar *location, AlpTimeZoneLocInfo **info)
 Retrieves the location information from the timezone database.
alp_status_t alp_timezone_selector_dml_get_loc_timezone (const gchar *location, gchar **zone)
 Retrieves the specified timezone from the timezone database.
alp_status_t alp_timezone_selector_dml_get_tz_location (const gchar *zone, gchar **location)
 Retrieves the specified location from the timezone database.
gint alp_timezone_selector_get_active (AlpTimeZoneSelector *selector)
 Retrieves the index number of the active item in the timezoneselector.
alp_status_t alp_timezone_selector_get_active_info (AlpTimeZoneSelector *selector, AlpTimeZoneLocInfo **info)
 Retrieves the information for the active location.
gchar * alp_timezone_selector_get_active_location (AlpTimeZoneSelector *selector)
 Retrieves the name of the active location from the timezoneselector.
alp_status_t alp_timezone_selector_get_active_timezone (AlpTimeZoneSelector *selector, gchar **zone)
 Retrieves the timezone of the active location.
GType alp_timezone_selector_get_type (void)
 Retrieves the TimezoneSelector type.
GtkWidget * alp_timezone_selector_new (gboolean self_update, GtkWindow *pwindow)
 Creates a new AlpTimeZoneSelector.
void alp_timezone_selector_prepend_text (AlpTimeZoneSelector *selector, const gchar *text)
 Prepends string to the list of strings stored in AlpTimeZoneSelector.
void alp_timezone_selector_set_active (AlpTimeZoneSelector *selector, gint index)
 Sets the active item of TimezoneSelector to be the item in the index.
alp_status_t alp_timezone_selector_set_list (AlpTimeZoneSelector *other_selector)
 Sets timezone selector with the lastest user defined locations.
gint alp_timezone_selector_set_location_active (AlpTimeZoneSelector *selector, const gchar *location)
 Sets the active item of timezone selector to be the given location.


Define Documentation

#define ALP_IS_TIMEZONE_SELECTOR obj   )     (G_TYPE_CHECK_INSTANCE_TYPE((obj), ALP_TYPE_TIMEZONE_SELECTOR))
 

#define ALP_IS_TIMEZONE_SELECTOR_CLASS klass   )     (G_TYPE_CHECK_CLASS_TYPE((klass), ALP_TYPE_TIMEZONE_SELECTOR))
 

#define ALP_NOTIFY_EVENT_TIMEZONE_CHANGE_TZ   "alp/timezone/change/tz"
 

The notification is broadcast after any timezone is added/removed/renamed in TimezoneSelector.

#define ALP_STATUS_TIMEZONE_API   (ALP_CLASS_TIMEZONE | 0x00020000)
 

#define ALP_STATUS_TIMEZONE_DML   (ALP_CLASS_TIMEZONE | 0x00010000)
 

#define ALP_STATUS_TZ_API_BAD_PARAM   (ALP_STATUS_TIMEZONE_API | 0x00000100)
 

#define ALP_STATUS_TZ_API_NO_LOCATION   (ALP_STATUS_TIMEZONE_API | 0x00000200)
 

#define ALP_STATUS_TZ_API_NO_ZONE   (ALP_STATUS_TIMEZONE_API | 0x00000300)
 

#define ALP_STATUS_TZ_DML_BAD_PARAM   (ALP_STATUS_TIMEZONE_DML | 0x00000100)
 

#define ALP_STATUS_TZ_DML_CORRUPT   (ALP_STATUS_TIMEZONE_DML | 0x00000800)
 

#define ALP_STATUS_TZ_DML_DATABASE_ERROR   (ALP_STATUS_TIMEZONE_DML | 0x00000600)
 

#define ALP_STATUS_TZ_DML_DUPLICATE   (ALP_STATUS_TIMEZONE_DML | 0x00000700)
 

#define ALP_STATUS_TZ_DML_EXISTS   (ALP_STATUS_TIMEZONE_DML | 0x00000900)
 

#define ALP_STATUS_TZ_DML_INTERNAL_ERROR   (ALP_STATUS_TIMEZONE_DML | 0x00000300)
 

#define ALP_STATUS_TZ_DML_INVALID_LUID   (ALP_STATUS_TIMEZONE_DML | 0x00000500)
 

#define ALP_STATUS_TZ_DML_NO_MEMORY   (ALP_STATUS_TIMEZONE_DML | 0x00000200)
 

#define ALP_STATUS_TZ_DML_NO_RECORDS   (ALP_STATUS_TIMEZONE_DML | 0x00000400)
 

#define ALP_TIMEZONE_SELECTOR obj   )     (G_TYPE_CHECK_INSTANCE_CAST((obj), ALP_TYPE_TIMEZONE_SELECTOR, AlpTimeZoneSelector))
 

#define ALP_TIMEZONE_SELECTOR_CLASS klass   )     (G_TYPE_CHECK_CLASS_CAST((klass), ALP_TYPE_TIMEZONE_SELECTOR, AlpTimeZoneSelectorClass))
 

#define ALP_TIMEZONE_SELECTOR_GET_CLASS obj   )     (G_TYPE_INSTANCE_GET_CLASS((obj), ALP_TYPE_TIMEZONE_SELECTOR, AlpTimeZoneSelectorClass))
 

#define ALP_TYPE_TIMEZONE_SELECTOR   (alp_timezone_selector_get_type())
 


Typedef Documentation

typedef struct _AlpTimeZoneLocInfo AlpTimeZoneLocInfo
 

The internal location type.

typedef struct _AlpTimeZoneSelector AlpTimeZoneSelector
 

typedef struct _AlpTimeZoneSelectorClass AlpTimeZoneSelectorClass
 


Function Documentation

alp_status_t alp_timezone_dml_get_sys_location_tz const gchar *  location,
gchar **  zone
 

Retrieves the corresponding timezone of the specified location from the system timezone database.

Parameters:
[in] location .
[out] zone newly allocate zone name where the location in.
Returns:
ALP_STATUS_OK success

ALP_STATUS_TZ* error

alp_status_t alp_timezone_dml_get_sys_tz_location const gchar *  zone,
gchar **  location
 

Retrieves the corresponding location of the specified timezone from the system timezone database.

Parameters:
[in] zone .
[out] location newly allocate location name where the timezone city in.
Returns:
ALP_STATUS_OK success

ALP_STATUS_TZ* error

alp_status_t alp_timezone_dml_get_user_tz_locations const gchar *  zone,
GList **  locations_list
 

get the list of locations associated with the specified timezone in the user timezone database. You must free the list values with g_free() and the list with g_list_free() when you are done.

Parameters:
[in] zone 
[out] locations_list 
Returns:
ALP_STATUS_OK success

ALP_STATUS_TZ* error

alp_status_t alp_timezone_selector_dml_get_infos GPtrArray **  informations  ) 
 

Retrieves all of the default user locations, zones, latitudes, and longitudes from the timezone database.

Parameters:
[in,out] Provides information about the newly-allocated GPtrArray. Each element in the pointer array is a pointer to a field in the AlpTimeZoneLocInfo structure.
Returns:
ALP_STATUS_OK success

ALP_STATUS_TZ* error

alp_status_t alp_timezone_selector_dml_get_loc_info const gchar *  location,
AlpTimeZoneLocInfo **  info
 

Retrieves the location information from the timezone database.

Parameters:
[in] location The current specified location.
[out] info Newly-created information about the specified location.
Returns:
ALP_STATUS_OK success

ALP_STATUS_TZ* error

alp_status_t alp_timezone_selector_dml_get_loc_timezone const gchar *  location,
gchar **  zone
 

Retrieves the specified timezone from the timezone database.

Parameters:
[in] location The current specified location.
[out] zone A newly-allocated zone-name for the specified location.
Returns:
ALP_STATUS_OK success

ALP_STATUS_TZ* error

alp_status_t alp_timezone_selector_dml_get_tz_location const gchar *  zone,
gchar **  location
 

Retrieves the specified location from the timezone database.

Parameters:
[in] zone The current specified zone.
[out] location A newly-allocated location-name for the specified timezone.
Returns:
ALP_STATUS_OK success

ALP_STATUS_TZ* error

gint alp_timezone_selector_get_active AlpTimeZoneSelector selector  ) 
 

Retrieves the index number of the active item in the timezoneselector.

Parameters:
[in] selector the AlpTimeZoneSelector widget
Returns:
The index number of the current active item; -1 if there is no active item.

alp_status_t alp_timezone_selector_get_active_info AlpTimeZoneSelector selector,
AlpTimeZoneLocInfo **  info
 

Retrieves the information for the active location.

Parameters:
[in] selector the AlpTimeZoneSelector widget
[out] info Information about the current specified location provided to the newly-allocated location.
Returns:
ALP_STATUS_OK success

ALP_STATUS_TZ* error

gchar* alp_timezone_selector_get_active_location AlpTimeZoneSelector selector  ) 
 

Retrieves the name of the active location from the timezoneselector.

Parameters:
[in] selector the AlpTimeZoneSelector widget
Returns:
A newly-allocated name for the current specified location; NULL when there is no specified location.

alp_status_t alp_timezone_selector_get_active_timezone AlpTimeZoneSelector selector,
gchar **  zone
 

Retrieves the timezone of the active location.

Parameters:
[in] selector the AlpTimeZoneSelector widget
[out] zone A newly-allocated zone-name for the current specified location.
Returns:
ALP_STATUS_OK success

ALP_STATUS_TZ* error

GType alp_timezone_selector_get_type void   ) 
 

Retrieves the TimezoneSelector type.

Parameters:
[in] none. 
Returns:
the new type identifier.

GtkWidget* alp_timezone_selector_new gboolean  self_update,
GtkWindow *  pwindow
 

Creates a new AlpTimeZoneSelector.

Parameters:
[in] self_update If TRUE, the selector itself updates the location list when the database changes; if FALSE, the selector does not update the location list when the database changes.
Returns:
a new AlpTimeZoneSelector @ note: This function only affects the selector where the user selects ‘Edit List’.

void alp_timezone_selector_prepend_text AlpTimeZoneSelector selector,
const gchar *  text
 

Prepends string to the list of strings stored in AlpTimeZoneSelector.

Parameters:
[in] selector the AlpTimeZoneSelector widget
[in] text the string you want to append to the AlpTimeZoneSelector.
Returns:
None NOTE: The interface is mainly for "Calendar" who will append "None" at the everybeging of the list

void alp_timezone_selector_set_active AlpTimeZoneSelector selector,
gint  index
 

Sets the active item of TimezoneSelector to be the item in the index.

Parameters:
[in] selector the AlpTimeZoneSelector widget
[in] index An index in the model passed during construction, or -1 to have no active item
Returns:
none

alp_status_t alp_timezone_selector_set_list AlpTimeZoneSelector other_selector  ) 
 

Sets timezone selector with the lastest user defined locations.

Parameters:
[in] other_selector AlpTimeZoneSelector widget you want to update locations.
Returns:
ALP_STATUS_OK success

ALP_STATUS_TZ* error

Note:
If there is only one timezoneselector in your application, the function will probably not needed, for the locations in timezoneseletor is maintained by itself when there is any change in locations. This function is mainly for updating other timezoneselectors' locations when you have more than one in your applicaion.

gint alp_timezone_selector_set_location_active AlpTimeZoneSelector selector,
const gchar *  location
 

Sets the active item of timezone selector to be the given location.

Parameters:
[in] selector an AlpTimeZoneSelector widget
[in] location the location you want to set active, If the given location was not in selector's list, no item be active
Returns:
the index of location in timezoneselector's location list


Generated on Wed Jul 30 07:06:44 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.