Tizen Native API  5.0

This module provides functionalities about ui_view.

Functions

ui_view * ui_view_create (const char *name)
 Creates an ui_view.
int ui_view_set_content (ui_view *view, Eo *content)
 Replaces or sets a content of ui_view.
Eo * ui_view_get_content (const ui_view *view)
 Returns a content of this view.
Eo * ui_view_unset_content (ui_view *view)
 Unsets a ui_view content.
int ui_view_set_event_cb (ui_view *view, ui_view_event_type_e event_type, ui_view_event_cb event_cb, void *user_data)
 Sets callback functions for handling view events.
Eo * ui_view_get_base (const ui_view *view)
 Gets a base object of ui_view.
int ui_view_set_indicator (ui_view *view, ui_view_indicator indicator)
 Sets the indicator mode of a ui_view.
ui_view_indicator ui_view_get_indicator (const ui_view *view)
 Returns the indicator mode of this view.
int ui_view_set_available_rotations (ui_view *view, const int *rotations, unsigned int count)
 Sets the array of view's available rotations.
const int * ui_view_get_available_rotations (const ui_view *view, unsigned int *count)
 Gets the array of view's available rotations.
int ui_view_set_removable_content (ui_view *view, bool removable)
 Sets content removable.
bool ui_view_get_removable_content (const ui_view *view)
 Returns a state of removable content.
int ui_view_get_degree (const ui_view *view)
 Gets the current view's degree.
ui_view_orientation_mode ui_view_get_orientation_mode (const ui_view *view)
 Gets current view's orientation mode.
int ui_view_set_transition_style (ui_view *view, const char *style)
 Sets transition style of a view.
const char * ui_view_get_transition_style (const ui_view *view)
 Returns a style name of this view.
ui_menu * ui_view_get_menu (const ui_view *view)
 Gets a ui_menu instance.
const char * ui_view_get_name (const ui_view *view)
 Returns a name of this view.
ui_view_state ui_view_get_state (const ui_view *view)
 Returns a state of this view.
int ui_view_destroy (ui_view *view)
 Destroys an ui_view.

Typedefs

typedef bool(* ui_view_event_cb )(ui_view *view, void *user_data)
 The ui_view event callback function signature.

Typedef Documentation

typedef bool(* ui_view_event_cb)(ui_view *view, void *user_data)

The ui_view event callback function signature.

Since :
3.0
Parameters:
[in]viewAn ui_view instance
[in]degreeCurrent view's degree
[in]dataThe user data to be passed to the given event_callback functions
Returns:
This is reserved
See also:
ui_view_event_type_e
ui_view_set_event_cb

Enumeration Type Documentation

Enumeration for ui_view event type.

Since :
3.0
Enumerator:
UI_VIEW_EVENT_LOAD 

Load

UI_VIEW_EVENT_UNLOAD 

Unload

UI_VIEW_EVENT_PAUSE 

Pause

UI_VIEW_EVENT_RESUME 

Resume

UI_VIEW_EVENT_ACTIVATE 

Activate

UI_VIEW_EVENT_DEACTIVATE 

Deactivate

UI_VIEW_EVENT_DESTROY 

Destroy

UI_VIEW_EVENT_LOAD_POST 

Load post

UI_VIEW_EVENT_UNLOAD_POST 

Unload post

UI_VIEW_EVENT_PAUSE_POST 

Pause post

UI_VIEW_EVENT_RESUME_POST 

Resume post

UI_VIEW_EVENT_ACTIVATE_POST 

Activate post

UI_VIEW_EVENT_DEACTIVATE_POST 

Deactivate post

UI_VIEW_EVENT_DESTROY_POST 

Destroy post

UI_VIEW_EVENT_ROTATE 

Rotate

UI_VIEW_EVENT_PORTRAIT 

Portrait

UI_VIEW_EVENT_LANDSCAPE 

Landscape

UI_VIEW_EVENT_BACK 

Back

UI_VIEW_EVENT_MENU 

Menu

UI_VIEW_EVENT_ROTATE_POST 

Rotate post

UI_VIEW_EVENT_PORTRAIT_POST 

Portrait post

UI_VIEW_EVENT_LANDSCAPE_POST 

Landscape post

UI_VIEW_EVENT_BACK_POST 

Back post

UI_VIEW_EVENT_MENU_POST 

Menu post


Function Documentation

ui_view* ui_view_create ( const char *  name)

Creates an ui_view.

Since :
3.0
Remarks:
If you don't set a view name, you could not look up the view with it's name. The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]nameView name
Returns:
The ui_view instance. NULL if failed
Exceptions:
UI_VIEWMGR_ERROR_NONESuccessfully added
UI_VIEWMGR_ERROR_OUT_OF_MEMORYFail to create new instance
See also:
ui_view_destroy()
ui_viewmgr_get_view_by_name()
get_last_result()
int ui_view_destroy ( ui_view *  view)

Destroys an ui_view.

Since :
3.0
Parameters:
[in]viewAn ui_view instance
Returns:
0 on success, otherwise a negative error value
Return values:
UI_VIEWMGR_ERROR_NONESuccessful
UI_VIEWMGR_ERROR_INVALID_PARAMETERview is invalid
See also:
ui_view_create()
ui_standard_view_create()
const int* ui_view_get_available_rotations ( const ui_view *  view,
unsigned int *  count 
)

Gets the array of view's available rotations.

Since :
3.0
Remarks:
NULL will be returned if view or count is invalid. The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]viewAn ui_view instance
[out]countThe number of arrays of rotations
Returns:
The array of rotation values
Exceptions:
UI_VIEWMGR_ERROR_NONESuccessfully added
UI_VIEWMGR_ERROR_INVALID_PARAMETERview is invalid
See also:
ui_view_set_available_rotations()
get_last_result()
Eo* ui_view_get_base ( const ui_view *  view)

Gets a base object of ui_view.

Since :
3.0
Remarks:
Normally, this base object can be used for a parent of a view content. The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]viewAn ui_view instance
Returns:
The base object of ui_view
Exceptions:
UI_VIEWMGR_ERROR_NONESuccessfully added
UI_VIEWMGR_ERROR_INVALID_PARAMETERview is invalid
See also:
get_last_result()
Eo* ui_view_get_content ( const ui_view *  view)

Returns a content of this view.

Since :
3.0
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]viewAn ui_view instance
Returns:
content of view. If no contents set yet, NULL
Exceptions:
UI_VIEWMGR_ERROR_NONESuccessfully added
UI_VIEWMGR_ERROR_INVALID_PARAMETERview is invalid
See also:
ui_view_set_content()
ui_view_unset_content()
get_last_result()
int ui_view_get_degree ( const ui_view *  view)

Gets the current view's degree.

Since :
3.0
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]viewAn ui_view instance
Returns:
Current rotation degree, -1 if it fails to get degree information
Exceptions:
UI_VIEWMGR_ERROR_NONESuccessfully added
UI_VIEWMGR_ERROR_INVALID_PARAMETERview is invalid
See also:
get_last_result()
ui_view_indicator ui_view_get_indicator ( const ui_view *  view)

Returns the indicator mode of this view.

Since :
3.0
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
viewAn ui_view instance
Returns:
Indicator state of the given view
Exceptions:
UI_VIEWMGR_ERROR_NONESuccessfully added
UI_VIEWMGR_ERROR_INVALID_PARAMETERview is invalid
See also:
ui_view_get_indicator()
get_last_result()
ui_menu* ui_view_get_menu ( const ui_view *  view)

Gets a ui_menu instance.

Since :
3.0
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]viewAn ui_view instance
Returns:
The ui_menu that connected with given view
Exceptions:
UI_VIEWMGR_ERROR_NONESuccessfully added
UI_VIEWMGR_ERROR_INVALID_PARAMETERview is invalid
See also:
get_last_result()
const char* ui_view_get_name ( const ui_view *  view)

Returns a name of this view.

Since :
3.0
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]viewAn ui_view instance
Returns:
Name of view
Exceptions:
UI_VIEWMGR_ERROR_NONESuccessfully added
UI_VIEWMGR_ERROR_INVALID_PARAMETERview is invalid
See also:
get_last_result()

Gets current view's orientation mode.

Since :
3.0
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]viewAn ui_view instance
Returns:
Current orientation mode, one of ui_view_orientation_mode
Exceptions:
UI_VIEWMGR_ERROR_NONESuccessfully added
UI_VIEWMGR_ERROR_INVALID_PARAMETERview is invalid
See also:
ui_view_orientation_mode
get_last_result()
bool ui_view_get_removable_content ( const ui_view *  view)

Returns a state of removable content.

Since :
3.0
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]viewAn ui_view instance
Returns:
true if the view's content is removable, otherwise false
Exceptions:
UI_VIEWMGR_ERROR_NONESuccessfully added
UI_VIEWMGR_ERROR_INVALID_PARAMETERview is invalid
See also:
ui_view_get_removable_content()
get_last_result()
ui_view_state ui_view_get_state ( const ui_view *  view)

Returns a state of this view.

Since :
3.0
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]viewAn ui_view instance
Returns:
current state of view
Exceptions:
UI_VIEWMGR_ERROR_NONESuccessfully added
UI_VIEWMGR_ERROR_INVALID_PARAMETERview is invalid
See also:
ui_view_state
get_last_result()
const char* ui_view_get_transition_style ( const ui_view *  view)

Returns a style name of this view.

Since :
3.0
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]viewAn ui_view instance
Returns:
Style name of view
Exceptions:
UI_VIEWMGR_ERROR_NONESuccessfully added
UI_VIEWMGR_ERROR_INVALID_PARAMETERview is invalid
See also:
ui_view_set_transition_style()
get_last_result()
int ui_view_set_available_rotations ( ui_view *  view,
const int *  rotations,
unsigned int  count 
)

Sets the array of view's available rotations.

Since :
3.0
Remarks:
Set an array of rotation values. For instance, {0, 90, 180, 270}. These rotation values depends on the system support.
Parameters:
[in]viewAn ui_view instance
[in]rotationsThe array of rotation values
[in]countThe number of arrays of rotations
Returns:
0 on success, otherwise a negative error value
Return values:
UI_VIEWMGR_ERROR_NONESuccessful
UI_VIEWMGR_ERROR_INVALID_PARAMETERIf view is invalid or count is less than 1 or rotations is invalid pointer
UI_VIEWMGR_ERROR_OUT_OF_MEMORYOut of Memory
UI_VIEWMGR_ERROR_NOT_PERMITTEDCurrent view manager system is not set up
See also:
ui_view_get_available_rotations()
int ui_view_set_content ( ui_view *  view,
Eo *  content 
)

Replaces or sets a content of ui_view.

Since :
3.0
Parameters:
[in]viewAn ui_view instance
[in]contentA new content. It allows NULL for canceling the previous content
Returns:
0 on success, otherwise a negative error value
Return values:
UI_VIEWMGR_ERROR_NONESuccessful
UI_VIEWMGR_ERROR_INVALID_PARAMETERif view is invalid
See also:
ui_view_get_content()
ui_view_unset_content()
int ui_view_set_event_cb ( ui_view *  view,
ui_view_event_type_e  event_type,
ui_view_event_cb  event_cb,
void *  user_data 
)

Sets callback functions for handling view events.

Since :
3.0
Remarks:
To unset the events, you can pass NULL to event_cb.
Parameters:
[in]viewAn ui_view instance
[in]event_typeui_view event type
[in]event_cbThe set of callback functions to handle view events
[in]user_dataThe user data to be passed to the given event_callback functions
Returns:
0 on success, otherwise a negative error value
Return values:
UI_VIEWMGR_ERROR_NONESuccessful
UI_VIEWMGR_ERROR_INVALID_PARAMETERif view is invalid
See also:
ui_view_event_type_e
int ui_view_set_indicator ( ui_view *  view,
ui_view_indicator  indicator 
)

Sets the indicator mode of a ui_view.

Since :
3.0
Parameters:
[in]viewAn ui_view instance
[in]indicatorThe mode to set, one of ui_view_indicator
Returns:
0 on success, otherwise a negative error value
Return values:
UI_VIEWMGR_ERROR_NONESuccessful
UI_VIEWMGR_ERROR_INVALID_PARAMETERInvalid Parameters
UI_VIEWMGR_ERROR_NOT_PERMITTEDCurrent view manager system is not set up
See also:
ui_view_indicator
ui_view_get_indicator()
int ui_view_set_removable_content ( ui_view *  view,
bool  removable 
)

Sets content removable.

Since :
3.0
Parameters:
[in]viewAn ui_view instance
[in]removableIf removable is true, content of this view will be removed on unload state. false otherwise
Warning:
You should not remove a view content manually on unload status if removable content is set
Returns:
0 on success, otherwise a negative error value
Return values:
UI_VIEWMGR_ERROR_NONESuccessful
UI_VIEWMGR_ERROR_INVALID_PARAMETERIf view is invalid or count is less than 1 or rotations is invalid pointer
See also:
ui_view_get_removable_content()
int ui_view_set_transition_style ( ui_view *  view,
const char *  style 
)

Sets transition style of a view.

Since :
3.0
Remarks:
style is reserved for supporting various kinds of view transition effects. The actual behaviors with this transition style is up to your frameworks. Default value of the style is NULL. and "none" represents none transition. If you don't like give any transition effects to this view, you can pass "none" as style.
Parameters:
[in]viewAn ui_view instance
[in]styleA transition style name
Returns:
0 on success, otherwise a negative error value
Return values:
UI_VIEWMGR_ERROR_NONESuccessful
UI_VIEWMGR_ERROR_INVALID_PARAMETERview is invalid or style is not supported
See also:
ui_view_get_transition_style()
Eo* ui_view_unset_content ( ui_view *  view)

Unsets a ui_view content.

Since :
3.0
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]viewAn ui_view instance
Returns:
A previous content. If it wasn't, return NULL
Exceptions:
UI_VIEWMGR_ERROR_NONESuccessfully added
UI_VIEWMGR_ERROR_INVALID_PARAMETERview is invalid
See also:
ui_view_set_content()
ui_view_get_content()
get_last_result()