Tizen Native API
5.5
|
The Frame Component API provides functions for handling Frame Component state changes or system events, and get information about the Frame Component.
#include <frame_component.h>
The Frame Component API provides functions for handling Frame Component of Component Based Application state changes or system events.
The frame component state change events include the following:
State | Description |
---|---|
frame_component_create_cb() | The callback function called after the frame component instance is created. |
frame_component_start_cb() | The callback function called when the frame component instance is started. |
frame_component_resume_cb() | The callback function called when the frame component becomes visible. |
frame_component_pause_cb() | The callback function called when the frame component becomes invisible. |
frame_component_stop_cb() | The callback function called before the frame component instance is stopped. |
frame_component_destroy_cb() | The callback function called before the frame component instance is destroyed. |
frame_component_restore_content_cb() | The callback function called when the content information of the frame component instance is restored. |
frame_component_save_content_cb() | The callback function called before the content information of the frame component instance is saved. |
frame_component_action_cb() | The callback function called when another application sends a launch request to the component. |
frame_component_device_orientation_changed_cb() | The callback function called when the device orientation is changed. |
frame_component_language_changed_cb() | The callback function called when the system language is changed. |
frame_component_region_format_changed_cb() | The callback function called when the system region format is changed. |
frame_component_low_battery_cb() | The callback function called when the battery status is changed. |
frame_component_low_memory_cb() | The callback function called when the memory status is changed. |
frame_component_suspended_state_changed_cb() | The callback function called when the suspended state of the frame component is changed. |
Please refer to the following state diagram to see the possible transitions and callbacks that are called while transition.
Functions | |
int | frame_component_get_display_status (component_h context, component_display_status_e *display_status) |
Gets the display status. | |
int | frame_component_get_window (component_h context, Evas_Object **window) |
Gets an Evas object for the frame component. | |
Typedefs | |
typedef Evas_Object *(* | frame_component_create_cb )(component_h context, void *user_data) |
Called when the frame component instance is created. | |
typedef void(* | frame_component_start_cb )(component_h context, app_control_h app_control, bool restarted, void *user_data) |
Called when the frame component instance is started. | |
typedef void(* | frame_component_resume_cb )(component_h context, void *user_data) |
Called when the frame component becomes visible. | |
typedef void(* | frame_component_pause_cb )(component_h context, void *user_data) |
Called when the frame component becomes invisible. | |
typedef void(* | frame_component_stop_cb )(component_h context, void *user_data) |
Called before the frame component instance is stopped. | |
typedef void(* | frame_component_destroy_cb )(component_h context, void *user_data) |
Called before the frame component instance is destroyed. | |
typedef void(* | frame_component_restore_content_cb )(component_h context, bundle *content, void *user_data) |
Called after the content information of the frame component instance is restored. | |
typedef void(* | frame_component_save_content_cb )(component_h context, bundle *content, void *user_data) |
Called before the content information of the frame component instance is saved. | |
typedef void(* | frame_component_action_cb )(component_h context, const char *action, app_control_h app_control, void *user_data) |
Called when another application sends a launch request to the component. | |
typedef void(* | frame_component_device_orientation_changed_cb )(component_h context, component_device_orientation_e orientation, void *user_data) |
Called when the device orientation is changed. | |
typedef void(* | frame_component_language_changed_cb )(component_h context, const char *language, void *user_data) |
Called when the system language is changed. | |
typedef void(* | frame_component_region_format_changed_cb )(component_h context, const char *region, void *user_data) |
Called when the system region format is changed. | |
typedef void(* | frame_component_low_battery_cb )(component_h context, component_low_battery_status_e status, void *user_data) |
Called when the battery status is changed. | |
typedef void(* | frame_component_low_memory_cb )(component_h context, component_low_memory_status_e status, void *user_data) |
Called when the memory status is changed. | |
typedef void(* | frame_component_suspended_state_changed_cb )(component_h context, component_suspended_state_e state, void *user_data) |
Called when the suspended state of the frame component is changed. |
typedef void(* frame_component_action_cb)(component_h context, const char *action, app_control_h app_control, void *user_data) |
Called when another application sends a launch request to the component.
Before calling frame_component_start_cb(), this callback function is called.
[in] | context | The context of the frame component instance |
[in] | action | The name of the app_control action |
[in] | app_control | The handle of the app_control |
[in] | user_data | The user data passed from component_based_app_add_frame_component() function |
typedef Evas_Object*(* frame_component_create_cb)(component_h context, void *user_data) |
Called when the frame component instance is created.
The returned Evas_Object MUST NOT be released using evas_object_del(). The platform frees the window when the frame component instance is destroyed.
[in] | context | The context of the frame component instance |
[in] | user_data | The user data passed from component_based_app_add_frame_component() function |
typedef void(* frame_component_destroy_cb)(component_h context, void *user_data) |
Called before the frame component instance is destroyed.
[in] | context | The context of the frame component instance |
[in] | user_data | The user data passed from component_based_app_add_frame_component() function |
typedef void(* frame_component_device_orientation_changed_cb)(component_h context, component_device_orientation_e orientation, void *user_data) |
Called when the device orientation is changed.
[in] | context | The context of the frame component instance |
[in] | orientation | The device orientation |
[in] | user_data | The user data passed from component_based_app_add_frame_component() function |
typedef void(* frame_component_language_changed_cb)(component_h context, const char *language, void *user_data) |
Called when the system language is changed.
[in] | context | The context of the frame component instance |
[in] | language | The language |
[in] | user_data | The user data passed from component_based_app_add_frame_component() function |
typedef void(* frame_component_low_battery_cb)(component_h context, component_low_battery_status_e status, void *user_data) |
Called when the battery status is changed.
[in] | context | The context of the frame component instance |
[in] | status | The low battery status |
[in] | user_data | The user data passed from component_based_app_add_frame_component() function |
typedef void(* frame_component_low_memory_cb)(component_h context, component_low_memory_status_e status, void *user_data) |
Called when the memory status is changed.
[in] | context | The context of the frame component instance |
[in] | status | The low memory status |
[in] | user_data | The user data passed from component_based_app_add_frame_component() function |
typedef void(* frame_component_pause_cb)(component_h context, void *user_data) |
Called when the frame component becomes invisible.
[in] | context | The context of the frame component instance |
[in] | user_data | The user data passed from component_based_app_add_frame_component() function |
typedef void(* frame_component_region_format_changed_cb)(component_h context, const char *region, void *user_data) |
Called when the system region format is changed.
[in] | context | The context of the frame component instance |
[in] | region | The region format |
[in] | user_data | The user data passed from component_based_app_add_frame_component() function |
typedef void(* frame_component_restore_content_cb)(component_h context, bundle *content, void *user_data) |
Called after the content information of the frame component instance is restored.
[in] | context | The context of the frame component instance |
[in] | content | The content information |
[in] | user_data | The user data passed from component_based_app_add_frame_component() function |
typedef void(* frame_component_resume_cb)(component_h context, void *user_data) |
Called when the frame component becomes visible.
[in] | context | The context of the frame component instance |
[in] | user_data | The user data passed from component_based_app_add_frame_component() function |
typedef void(* frame_component_save_content_cb)(component_h context, bundle *content, void *user_data) |
Called before the content information of the frame component instance is saved.
[in] | context | The context of the frame component instance |
[in] | content | The content information |
[in] | user_data | The user data passed from component_based_app_add_frame_component() function |
typedef void(* frame_component_start_cb)(component_h context, app_control_h app_control, bool restarted, void *user_data) |
Called when the frame component instance is started.
[in] | context | The context of the frame component instance |
[in] | app_control | The app control handle |
[in] | restarted | true , if the instance is restarted |
[in] | user_data | The user data passed from component_based_app_add_frame_component() function |
typedef void(* frame_component_stop_cb)(component_h context, void *user_data) |
Called before the frame component instance is stopped.
[in] | context | The context of the frame component instance |
[in] | user_data | The user data passed from component_based_app_add_frame_component() function |
typedef void(* frame_component_suspended_state_changed_cb)(component_h context, component_suspended_state_e state, void *user_data) |
Called when the suspended state of the frame component is changed.
[in] | context | The context of the frame component instance |
[in] | state | The suspended state |
[in] | user_data | The user data passed from component_based_app_add_frame_component() function |
int frame_component_get_display_status | ( | component_h | context, |
component_display_status_e * | display_status | ||
) |
Gets the display status.
[in] | context | The context of the frame component instance |
[out] | display_status | The display status |
0
on success, otherwise a negative error value COMPONENT_ERROR_NONE | Successful |
COMPONENT_ERROR_NOT_SUPPORTED | Not supported |
COMPONENT_ERROR_INVALID_PARAMETER | Invalid parameter |
COMPONENT_ERROR_INVALID_CONTEXT | The display is in an unknown state. |
int frame_component_get_window | ( | component_h | context, |
Evas_Object ** | window | ||
) |
Gets an Evas object for the frame component.
window
MUST NOT be released using evas_object_del(). The platform frees window when the frame component instance is destroyed.[in] | context | The context of the frame component instance |
[out] | window | The evas object for window |
0
on success, otherwise a negative error value COMPONENT_ERROR_NONE | Successful |
COMPONENT_ERROR_INVALID_PARAMETER | Invalid parameter |