Tizen Native API  7.0
View Event Data

This provides APIs related to operations, used in View Event Data.

Supported Event types are following:

  • User gesture over the Map
  • Map action, such as zooming or rotation
  • Object Event, such as pressing or moving
  • View readiness
Features available by Event Type
The correspondence between the type of event and available event data is following:
Feature/Event Type Gesture Action Object Ready
maps_view_event_type_e ++++
maps_view_gesture_e ++
maps_view_action_e +
maps_view_event_data_destroy() ++++
maps_view_event_data_clone() ++++
maps_view_event_data_get_type() ++++
maps_view_event_data_get_gesture_type() ++
maps_view_event_data_get_action_type() +
maps_view_event_data_get_center() +
maps_view_event_data_get_delta() +
maps_view_event_data_get_position() ++
maps_view_event_data_get_coordinates() +
maps_view_event_data_get_fingers() ++
maps_view_event_data_get_zoom_factor() ++
maps_view_event_data_get_rotation_angle() ++
maps_view_event_data_get_object() +

Note: the event of type MAPS_VIEW_EVENT_READY has no additional data besides the type.

Functions

int maps_view_event_data_destroy (maps_view_event_data_h event)
 Destroys the event data handle.
int maps_view_event_data_clone (const maps_view_event_data_h origin, maps_view_event_data_h *cloned)
 Clones the event handle.
int maps_view_event_data_get_type (const maps_view_event_data_h event, maps_view_event_type_e *event_type)
 Gets the event type.
int maps_view_event_data_get_gesture_type (const maps_view_event_data_h event, maps_view_gesture_e *gesture_type)
 Gets the event gesture type.
int maps_view_event_data_get_action_type (const maps_view_event_data_h event, maps_view_action_e *action_type)
 Gets the event action type.
int maps_view_event_data_get_center (const maps_view_event_data_h event, maps_coordinates_h *center)
 Gets the new map center coordinates.
int maps_view_event_data_get_delta (const maps_view_event_data_h event, int *delta_x, int *delta_y)
 Gets the new map center movement coordinates delta.
int maps_view_event_data_get_position (const maps_view_event_data_h event, int *x, int *y)
 Gets the event screen coordinates.
int maps_view_event_data_get_coordinates (const maps_view_event_data_h event, maps_coordinates_h *coordinates)
 Gets the event geographic coordinates.
int maps_view_event_data_get_fingers (const maps_view_event_data_h event, int *fingers)
 Gets the number of fingers, detected in the event.
int maps_view_event_data_get_zoom_factor (const maps_view_event_data_h event, double *zoom_factor)
 Gets zoom factor of zoom gesture or action.
int maps_view_event_data_get_rotation_angle (const maps_view_event_data_h event, double *rotation_angle)
 Gets rotation angle of rotation gesture or action.
int maps_view_event_data_get_object (const maps_view_event_data_h event, maps_view_object_h *object)
 Gets object of event.

Typedefs

typedef void * maps_view_event_data_h
 The View Event data handle.
typedef enum _maps_view_action_e maps_view_action_e
 Enumeration for View actions.
typedef enum _maps_view_gesture_e maps_view_gesture_e
 Enumeration for user gestures over View.
typedef enum
_maps_view_event_type_e 
maps_view_event_type_e
 Enumeration for map event types.

Typedef Documentation

Enumeration for View actions.

This is an enumeration of View actions capable to perform.

Since :
3.0
Remarks:
The View performs actions in response on user gestures, such as tap, zoom, long press, or APIs, such as set center or change zoom level.
To re-assign View actions to user gestures use maps_view_set_gesture_action().
See also:
maps_view_gesture_e
typedef void* maps_view_event_data_h

The View Event data handle.

The handle of View Event Data instance.

Since :
3.0
Remarks:
To release the handle use maps_view_event_data_destroy().
To clone the handle use maps_view_event_data_clone().
See also:
maps_view_event_data_destroy()
maps_view_event_data_clone()

Enumeration for map event types.

Since :
3.0

Enumeration for user gestures over View.

Since :
3.0

Enumeration Type Documentation

Enumeration for View actions.

This is an enumeration of View actions capable to perform.

Since :
3.0
Remarks:
The View performs actions in response on user gestures, such as tap, zoom, long press, or APIs, such as set center or change zoom level.
To re-assign View actions to user gestures use maps_view_set_gesture_action().
See also:
maps_view_gesture_e
Enumerator:
MAPS_VIEW_ACTION_NONE 

Indicates the empty action

MAPS_VIEW_ACTION_SCROLL 

Indicates the set center action

MAPS_VIEW_ACTION_ZOOM 

Indicates the zoom action

MAPS_VIEW_ACTION_ZOOM_IN 

Indicates the zoom-in action

MAPS_VIEW_ACTION_ZOOM_OUT 

Indicates the zoom-out action

MAPS_VIEW_ACTION_ZOOM_AND_SCROLL 

Indicates the zoom and scrolling action

MAPS_VIEW_ACTION_ROTATE 

Indicates the rotation action

Enumeration for map event types.

Since :
3.0
Enumerator:
MAPS_VIEW_EVENT_GESTURE 

Indicates the gesture event callback

MAPS_VIEW_EVENT_ACTION 

Indicates the action callback

MAPS_VIEW_EVENT_OBJECT 

Indicates the object event callback

MAPS_VIEW_EVENT_READY 

Indicates the View readiness callback

Enumeration for user gestures over View.

Since :
3.0
Enumerator:
MAPS_VIEW_GESTURE_NONE 

Indicates the empty gesture

MAPS_VIEW_GESTURE_SCROLL 

Indicates the move map user gesture

MAPS_VIEW_GESTURE_ZOOM 

Indicates the zoom user gesture

MAPS_VIEW_GESTURE_TAP 

Indicates the tap user gesture

MAPS_VIEW_GESTURE_DOUBLE_TAP 

Indicates the double tap user gesture

MAPS_VIEW_GESTURE_2_FINGER_TAP 

Indicates the two-finger tap user gesture

MAPS_VIEW_GESTURE_ROTATE 

Indicates the rotation user gesture

MAPS_VIEW_GESTURE_LONG_PRESS 

Indicates the long press user gesture


Function Documentation

Clones the event handle.

This function clones the event handle origin and all its resources.

Since :
3.0
Remarks:
cloned must be released using maps_view_event_data_destroy().
Parameters:
[in]originThe original event handle
[out]clonedA cloned event handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_OUT_OF_MEMORYOut of memory
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
event may be obtained in maps_view_on_event_cb().
See also:
maps_view_event_data_h
maps_view_event_data_destroy()
maps_view_on_event_cb()

Destroys the event data handle.

This function destroys the event data handle and releases all its resources.

Since :
3.0
Parameters:
[in]eventThe event data handle to destroy
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
event may be obtained in maps_view_on_event_cb().
See also:
maps_view_event_data_h
maps_view_event_data_clone()

Gets the event action type.

This function gets the event action type if the event type is MAPS_VIEW_EVENT_ACTION. Otherwise, it returns MAPS_ERROR_INVALID_PARAMETER.

Since :
3.0
Parameters:
[in]eventThe event data handle
[out]action_typeThe pointer to the maps_view_action_e in which to store the action type
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
event may be obtained in maps_view_on_event_cb().
See also:
maps_view_action_e
maps_view_event_data_h
maps_view_event_data_get_type()
maps_view_on_event_cb()

Gets the new map center coordinates.

This function gets the new map center coordinates if the event type is MAPS_VIEW_EVENT_ACTION. Otherwise, it returns MAPS_ERROR_INVALID_PARAMETER.

Since :
3.0
Remarks:
The center should be freed using maps_coordinates_destroy().
Parameters:
[in]eventThe event data handle
[out]centerThe pointer to the maps_coordinates_h in which to store the new center coordinates
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
event may be obtained in maps_view_on_event_cb().
See also:
maps_view_event_type_e
maps_view_event_data_h
maps_coordinates_h
maps_view_event_data_get_type()
maps_view_on_event_cb()

Gets the event geographic coordinates.

This function gets the event geographic coordinates if the event type is MAPS_VIEW_EVENT_GESTURE. Otherwise, it returns MAPS_ERROR_INVALID_PARAMETER.

Since :
3.0
Remarks:
The coordinates should be freed using maps_coordinates_destroy().
Parameters:
[in]eventThe event data handle
[out]coordinatesThe pointer to the maps_coordinates_h in which to store the coordinates
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
event may be obtained in maps_view_on_event_cb().
See also:
maps_view_event_type_e
maps_view_event_data_h
maps_coordinates_h
maps_view_event_data_get_type()
maps_view_on_event_cb()
int maps_view_event_data_get_delta ( const maps_view_event_data_h  event,
int *  delta_x,
int *  delta_y 
)

Gets the new map center movement coordinates delta.

This function gets the screen coordinates delta of map center movement if the event type is MAPS_VIEW_EVENT_ACTION. Otherwise, it returns MAPS_ERROR_INVALID_PARAMETER.

Since :
3.0
Parameters:
[in]eventThe event data handle
[out]delta_xThe pointer to an integer in which to store the delta x
[out]delta_yThe pointer to an integer in which to store the delta y
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
event may be obtained in maps_view_on_event_cb().
See also:
maps_view_event_type_e
maps_view_event_data_h
maps_view_event_data_get_type()
maps_view_on_event_cb()
int maps_view_event_data_get_fingers ( const maps_view_event_data_h  event,
int *  fingers 
)

Gets the number of fingers, detected in the event.

This function gets the number of user's fingers detected in the event if the event type is MAPS_VIEW_EVENT_GESTURE or MAPS_VIEW_EVENT_OBJECT. Otherwise, it returns MAPS_ERROR_INVALID_PARAMETER.

Since :
3.0
Parameters:
[in]eventThe event data handle
[out]fingersThe pointer to an integer in which to store the number of fingers, detected in the gesture
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
event may be obtained in maps_view_on_event_cb().
See also:
maps_view_event_type_e
maps_view_event_data_h
maps_view_event_data_get_type()
maps_view_on_event_cb()

Gets the event gesture type.

This function gets the event gesture type if the event type is MAPS_VIEW_EVENT_GESTURE or MAPS_VIEW_EVENT_OBJECT. Otherwise it returns MAPS_ERROR_INVALID_PARAMETER.

Since :
3.0
Parameters:
[in]eventThe event data handle
[out]gesture_typeThe pointer to the maps_view_gesture_e in which to store the gesture type
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
event may be obtained in maps_view_on_event_cb().
See also:
maps_view_gesture_e
maps_view_event_data_h
maps_view_event_data_get_type()
maps_view_on_event_cb()

Gets object of event.

When the event type is MAPS_VIEW_EVENT_OBJECT, this function gets the corresponding object handle. Otherwise, it returns MAPS_ERROR_INVALID_PARAMETER.

Since :
3.0
Remarks:
The object must not be released.
Parameters:
[in]eventThe event data handle
[out]objectThe pointer to maps_view_object_h in which to store the object handle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
event may be obtained in maps_view_on_event_cb().
See also:
maps_view_event_type_e
maps_view_event_data_h
maps_view_event_data_get_type()
maps_view_on_event_cb()
int maps_view_event_data_get_position ( const maps_view_event_data_h  event,
int *  x,
int *  y 
)

Gets the event screen coordinates.

This function gets the event screen coordinates if the event type is MAPS_VIEW_EVENT_GESTURE or MAPS_VIEW_EVENT_OBJECT. Otherwise, it returns MAPS_ERROR_INVALID_PARAMETER.

Since :
3.0
Parameters:
[in]eventThe event data handle
[out]xThe pointer to an integer in which to store the x position of the event
[out]yThe pointer to an integer in which to store the y position of the event
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
event may be obtained in maps_view_on_event_cb().
See also:
maps_view_event_type_e
maps_view_event_data_h
maps_view_event_data_get_type()
maps_view_on_event_cb()
int maps_view_event_data_get_rotation_angle ( const maps_view_event_data_h  event,
double *  rotation_angle 
)

Gets rotation angle of rotation gesture or action.

This function gets the corresponding rotation angle if the event type is MAPS_VIEW_EVENT_GESTURE or MAPS_VIEW_EVENT_ACTION. Otherwise, it returns MAPS_ERROR_INVALID_PARAMETER.

Since :
3.0
Parameters:
[in]eventThe event data handle
[out]rotation_angleThe pointer to a double in which to store the rotation angle
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
event may be obtained in maps_view_on_event_cb().
See also:
maps_view_event_type_e
maps_view_event_data_h
maps_view_event_data_get_type()
maps_view_on_event_cb()

Gets the event type.

This function gets the event type.

Since :
3.0
Parameters:
[in]eventThe event data handle
[out]event_typeThe pointer to the maps_view_event_type_e in which to store the event type
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
event may be obtained in maps_view_on_event_cb().
See also:
maps_view_event_type_e
maps_view_event_data_h
maps_view_event_data_destroy()
maps_view_on_event_cb()
int maps_view_event_data_get_zoom_factor ( const maps_view_event_data_h  event,
double *  zoom_factor 
)

Gets zoom factor of zoom gesture or action.

This function gets the corresponding zoom factor if the event type is MAPS_VIEW_EVENT_GESTURE or MAPS_VIEW_EVENT_ACTION. Otherwise, it returns the MAPS_ERROR_INVALID_PARAMETER.

Since :
3.0
Parameters:
[in]eventThe event data handle
[out]zoom_factorThe pointer to a double in which to store the zoom factor
Returns:
0 on success, otherwise a negative error value
Return values:
MAPS_ERROR_NONESuccessful
MAPS_ERROR_INVALID_PARAMETERInvalid parameter
MAPS_ERROR_NOT_SUPPORTEDNot supported
Precondition:
event may be obtained in maps_view_on_event_cb().
See also:
maps_view_event_type_e
maps_view_event_data_h
maps_view_event_data_get_type()
maps_view_on_event_cb()