Tizen Native API  4.0
External Output Manager

The External Output Manager provides APIs for external outputs.

Required Header

#include <eom.h>

Overview

The External Output Manager (EOM) is for managing external outputs. User can get the information of external outputs and control them via eom API.

Features :

Functions

int eom_init (void)
 Initializes External Output Manager (EOM).
void eom_deinit (void)
 Finalizes External Output Manager (EOM).
int eom_set_output_added_cb (eom_output_added_cb callback, void *user_data)
 Registers a callback function to get output connection notification from External Output Manager (EOM) module.
int eom_unset_output_added_cb (eom_output_added_cb callback)
 Unregisters the callback function.
int eom_set_output_removed_cb (eom_output_removed_cb callback, void *user_data)
 Registers a callback function to get output disconnection notification from External Output Manager (EOM) module.
int eom_unset_output_removed_cb (eom_output_removed_cb callback)
 Unregisters the callback function.
int eom_set_mode_changed_cb (eom_mode_changed_cb callback, void *user_data)
 Registers a callback function to get output mode changing notification from External Output Manager (EOM) module.
int eom_unset_mode_changed_cb (eom_mode_changed_cb callback)
 Unregisters the callback function.
int eom_set_attribute_changed_cb (eom_attribute_changed_cb callback, void *user_data)
 Registers a callback function to get output attribute changing notification from External Output Manager (EOM) module.
int eom_unset_attribute_changed_cb (eom_attribute_changed_cb callback)
 Unregisters the callback function.
eom_output_ideom_get_eom_output_ids (int *count)
 Gets the IDs and count of external output.
int eom_get_output_type (eom_output_id output_id, eom_output_type_e *type)
 Gets type of external output.
int eom_get_output_mode (eom_output_id output_id, eom_output_mode_e *mode)
 Gets mode of external output.
int eom_get_output_attribute (eom_output_id output_id, eom_output_attribute_e *attribute)
 Gets attribute of external output.
int eom_get_output_attribute_state (eom_output_id output_id, eom_output_attribute_state_e *state)
 Gets attribute state of external output.
int eom_get_output_resolution (eom_output_id output_id, int *width, int *height)
 Gets resolution of external output.
int eom_get_output_physical_size (eom_output_id output_id, int *phy_width, int *phy_height)
 Gets physical width/height (millimeters) of external output.
int eom_set_output_attribute (eom_output_id output_id, eom_output_attribute_e attr)
 Sets the attribute of the external output ID.
int eom_set_output_window (eom_output_id output_id, Evas_Object *win)
 Sets window to the external output best resolution of external output device.

Typedefs

typedef unsigned int eom_output_id
 Definition for external output ID.
typedef void(* eom_output_added_cb )(eom_output_id output_id, void *user_data)
 Called when External Output Manager (EOM) module sends output connection notification.
typedef void(* eom_output_removed_cb )(eom_output_id output_id, void *user_data)
 Called when External Output Manager (EOM) module sends output disconnection notification.
typedef void(* eom_mode_changed_cb )(eom_output_id output_id, void *user_data)
 Called when External Output Manager (EOM) module sends output mode changing notification.
typedef void(* eom_attribute_changed_cb )(eom_output_id output_id, void *user_data)
 Called when External Output Manager (EOM) module sends output attribute changing notification.

Typedef Documentation

typedef void(* eom_attribute_changed_cb)(eom_output_id output_id, void *user_data)

Called when External Output Manager (EOM) module sends output attribute changing notification.

Since :
2.4
Parameters:
[in]output_idThe output id which is connected output
[in]user_dataThe pointer of user data which is passed to eom_attribute_changed_cb function
See also:
eom_set_attribute_changed_cb()
eom_unset_attribute_changed_cb()
typedef void(* eom_mode_changed_cb)(eom_output_id output_id, void *user_data)

Called when External Output Manager (EOM) module sends output mode changing notification.

Since :
2.4
Parameters:
[in]output_idThe output id which is connected output
[in]user_dataThe pointer of user data which is passed to eom_mode_changed_cb function
See also:
eom_set_mode_changed_cb()
eom_unset_mode_changed_cb()
typedef void(* eom_output_added_cb)(eom_output_id output_id, void *user_data)

Called when External Output Manager (EOM) module sends output connection notification.

Since :
2.4
Parameters:
[in]output_idThe output id which is connected output
[in]user_dataThe pointer of user data which is passed to eom_output_added_cb function
See also:
eom_set_output_added_cb()
eom_unset_output_added_cb()
typedef unsigned int eom_output_id

Definition for external output ID.

Since :
2.4
typedef void(* eom_output_removed_cb)(eom_output_id output_id, void *user_data)

Called when External Output Manager (EOM) module sends output disconnection notification.

Since :
2.4
Parameters:
[in]output_idThe output id which is connected output
[in]user_dataThe pointer of user data which is passed to eom_output_removed_cb function
See also:
eom_set_output_removed_cb()
eom_unset_output_removed_cb()

Enumeration Type Documentation

Enumeration of External Output Manager (EOM) error type.

Since :
2.4
Enumerator:
EOM_ERROR_NONE 

Success

EOM_ERROR_OUT_OF_MEMORY 

Memory allocation failure

EOM_ERROR_INVALID_PARAMETER 

Invalid input parameter

EOM_ERROR_NO_SUCH_DEVICE 

Invalid external output instance

EOM_ERROR_CONNECTION_FAILURE 

Connection failure

EOM_ERROR_MESSAGE_SENDING_FAILURE 

Message sending failure

EOM_ERROR_MESSAGE_OPERATION_FAILURE 

Message operation failure

Enumeration of External Output Manager (EOM) attributes.

Since :
2.4
Enumerator:
EOM_OUTPUT_ATTRIBUTE_NONE 

None

EOM_OUTPUT_ATTRIBUTE_NORMAL 

Normal presentation mode window showing on external output

EOM_OUTPUT_ATTRIBUTE_EXCLUSIVE_SHARE 

Exclusive share presentation mode window showing on external output

EOM_OUTPUT_ATTRIBUTE_EXCLUSIVE 

Exclusive presentation mode window showing on external output

Enumeration of External Output Manager (EOM) attribute state.

Since :
2.4
Enumerator:
EOM_OUTPUT_ATTRIBUTE_STATE_NONE 

None

EOM_OUTPUT_ATTRIBUTE_STATE_ACTIVE 

Output attribute is active

EOM_OUTPUT_ATTRIBUTE_STATE_INACTIVE 

Output attribute is inactive

EOM_OUTPUT_ATTRIBUTE_STATE_LOST 

Cannot use external output

Enumeration of external output mode.

Since :
2.4
Enumerator:
EOM_OUTPUT_MODE_NONE 

None

EOM_OUTPUT_MODE_MIRROR 

Mirror mode

EOM_OUTPUT_MODE_PRESENTATION 

Presentation mode

Enumeration of external output type.

Since :
2.4
Enumerator:
EOM_OUTPUT_TYPE_UNKNOWN 

Unknown output type

EOM_OUTPUT_TYPE_VGA 

VGA output

EOM_OUTPUT_TYPE_DVII 

DVII output type

EOM_OUTPUT_TYPE_DVID 

DVID output type

EOM_OUTPUT_TYPE_DVIA 

DVIA output type

EOM_OUTPUT_TYPE_COMPOSITE 

Composite output type

EOM_OUTPUT_TYPE_SVIDEO 

SVIDEO output type

EOM_OUTPUT_TYPE_LVDS 

LVDS output type

EOM_OUTPUT_TYPE_COMPONENT 

Component output type

EOM_OUTPUT_TYPE_9PINDIN 

9PinDIN output type

EOM_OUTPUT_TYPE_DISPLAYPORT 

DisplayPort output type

EOM_OUTPUT_TYPE_HDMIA 

HDMIA output type

EOM_OUTPUT_TYPE_HDMIB 

HDMIB output type

EOM_OUTPUT_TYPE_TV 

TV output type

EOM_OUTPUT_TYPE_EDP 

EDP output type

EOM_OUTPUT_TYPE_VIRTUAL 

VIRTUAL output type

EOM_OUTPUT_TYPE_DSI 

DSI output type


Function Documentation

void eom_deinit ( void  )

Finalizes External Output Manager (EOM).

User should call this function after using EOM to release all resources of EOM.

Since :
2.4
See also:
eom_init()

Gets the IDs and count of external output.

This function returns the IDs of external output which are available to connect to target device, and the count of them also. User can get the id of external output. which user want to watch.

Since :
2.4
Remarks:
User should free return value by using free(). The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[out]countThe count of the eom_output_id supported by system
Returns:
The array of the eom_output_id if this function succeeds, otherwise NULL
Return values:
Thepointer of eom_output_id
Exceptions:
EOM_ERROR_NONESuccessful
EOM_ERROR_INVALID_PARAMETERInvalid parameter
EOM_ERROR_OUT_OF_MEMORYMemory allocation failure
Precondition:
eom_init()
See also:
eom_output_id
eom_error_e
int eom_get_output_attribute ( eom_output_id  output_id,
eom_output_attribute_e attribute 
)

Gets attribute of external output.

Since :
2.4
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]output_idThe id of external output device
[out]attributeThe attribute of external output instance
Returns:
0 on success, otherwise a negative error value
Return values:
EOM_ERROR_NONESuccessful
EOM_ERROR_INVALID_PARAMETERInvalid parameter
EOM_ERROR_NO_SUCH_DEVICEInvalid external output instance
Precondition:
eom_init()
eom_get_eom_output_ids()
See also:
eom_output_id
eom_error_e
eom_output_attribute_e

Gets attribute state of external output.

Since :
2.4
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]output_idThe id of external output device
[out]stateThe attribute state of external output instance
Returns:
0 on success, otherwise a negative error value
Return values:
EOM_ERROR_NONESuccessful
EOM_ERROR_INVALID_PARAMETERInvalid parameter
EOM_ERROR_NO_SUCH_DEVICEInvalid external output instance
Precondition:
eom_init()
eom_get_eom_output_ids()
See also:
eom_output_id
eom_error_e
eom_output_attribute_state_e
int eom_get_output_mode ( eom_output_id  output_id,
eom_output_mode_e mode 
)

Gets mode of external output.

Since :
2.4
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]output_idThe id of external output device
[out]modeThe mode of external output instance
Returns:
0 on success, otherwise a negative error value
Return values:
EOM_ERROR_NONESuccessful
EOM_ERROR_INVALID_PARAMETERInvalid parameter
EOM_ERROR_NO_SUCH_DEVICEInvalid external output instance
Precondition:
eom_init()
eom_get_eom_output_ids()
See also:
eom_output_id
eom_error_e
eom_output_mode_e
int eom_get_output_physical_size ( eom_output_id  output_id,
int *  phy_width,
int *  phy_height 
)

Gets physical width/height (millimeters) of external output.

Since :
2.4
Parameters:
[in]output_idThe id of external output device
[out]phy_widthThe physical mm width of external output instance
[out]phy_heightThe physical mm height of external output instance
Returns:
0 on success, otherwise a negative error value
Return values:
EOM_ERROR_NONESuccessful
EOM_ERROR_INVALID_PARAMETERInvalid parameter
EOM_ERROR_NO_SUCH_DEVICEInvalid external output instance
Precondition:
eom_init()
eom_get_eom_output_ids()
See also:
eom_output_id
eom_error_e
int eom_get_output_resolution ( eom_output_id  output_id,
int *  width,
int *  height 
)

Gets resolution of external output.

Since :
2.4
Parameters:
[in]output_idThe id of external output device
[out]widthThe width of external output instance
[out]heightThe height of external output instance
Returns:
0 on success, otherwise a negative error value
Return values:
EOM_ERROR_NONESuccessful
EOM_ERROR_INVALID_PARAMETERInvalid parameter
EOM_ERROR_NO_SUCH_DEVICEInvalid external output instance
Precondition:
eom_init()
eom_get_eom_output_ids()
See also:
eom_output_id
eom_error_e
int eom_get_output_type ( eom_output_id  output_id,
eom_output_type_e type 
)

Gets type of external output.

Since :
2.4
Remarks:
The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
Parameters:
[in]output_idThe id of external output device
[out]typeThe type of external output instance
Returns:
0 on success, otherwise a negative error value
Return values:
EOM_ERROR_NONESuccessful
EOM_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
eom_init()
eom_get_eom_output_ids()
See also:
eom_output_id
eom_error_e
eom_output_type_e
int eom_init ( void  )

Initializes External Output Manager (EOM).

User should call this function previously for using EOM.

Since :
2.4
Remarks:
After all using, call eom_deinit() function for resource returning.
Returns:
0 on success, otherwise a negative error value
Return values:
EOM_ERROR_NONESuccessful
EOM_ERROR_CONNECTION_FAILUREThe EOM connection failure
See also:
eom_deinit()
eom_error_e
int eom_set_attribute_changed_cb ( eom_attribute_changed_cb  callback,
void *  user_data 
)

Registers a callback function to get output attribute changing notification from External Output Manager (EOM) module.

Since :
2.4
Parameters:
[in]callbackThe function pointer of eom_attribute_changed_cb callback function
[in]user_dataThe pointer of user data which is passed to eom_attribute_changed_cb function
Returns:
0 on success, otherwise a negative error value
Return values:
EOM_ERROR_NONESuccessful
EOM_ERROR_OUT_OF_MEMORYMemory allocation failure
EOM_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
eom_init()
eom_get_eom_output_ids()
See also:
eom_unset_attribute_changed_cb()
eom_attribute_changed_cb
int eom_set_mode_changed_cb ( eom_mode_changed_cb  callback,
void *  user_data 
)

Registers a callback function to get output mode changing notification from External Output Manager (EOM) module.

Since :
2.4
Parameters:
[in]callbackThe function pointer of eom_mode_changed_cb callback function
[in]user_dataThe pointer of user data which is passed to eom_mode_changed_cb function
Returns:
0 on success, otherwise a negative error value
Return values:
EOM_ERROR_NONESuccessful
EOM_ERROR_OUT_OF_MEMORYMemory allocation failure
EOM_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
eom_init()
eom_get_eom_output_ids()
See also:
eom_unset_mode_changed_cb()
eom_mode_changed_cb
int eom_set_output_added_cb ( eom_output_added_cb  callback,
void *  user_data 
)

Registers a callback function to get output connection notification from External Output Manager (EOM) module.

Since :
2.4
Parameters:
[in]callbackThe function pointer of eom_output_added_cb callback function
[in]user_dataThe pointer of user data which is passed to eom_output_added_cb function
Returns:
0 on success, otherwise a negative error value
Return values:
EOM_ERROR_NONESuccessful
EOM_ERROR_OUT_OF_MEMORYMemory allocation failure
EOM_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
eom_init()
eom_get_eom_output_ids()
See also:
eom_unset_output_added_cb()
eom_output_added_cb

Sets the attribute of the external output ID.

The application can set the External Output Manager (EOM) attribute to the external output ID. The EOM module manages the windows to display on external output and control the policy of external output. The application can recognize the attribute state and manage the resources when the application receives several notification callback from EOM module.

Since :
2.4
Parameters:
[in]output_idThe id of external output device
[in]attrThe attribute of the external output
Returns:
0 on success, otherwise a negative error value
Return values:
EOM_ERROR_NONESuccessful
EOM_ERROR_INVALID_PARAMETERInvalid parameter
EOM_ERROR_NO_SUCH_DEVICEInvalid external output instance
EOM_ERROR_MESSAGE_SENDING_FAILURECommunication failure with EOM module
EOM_ERROR_MESSAGE_OPERATION_FAILUREOperation failure
Precondition:
eom_init()
eom_get_eom_output_ids()
See also:
eom_output_id
eom_error_e
int eom_set_output_removed_cb ( eom_output_removed_cb  callback,
void *  user_data 
)

Registers a callback function to get output disconnection notification from External Output Manager (EOM) module.

Since :
2.4
Parameters:
[in]callbackThe function pointer of eom_output_removed_cb callback function
[in]user_dataThe pointer of user data which is passed to eom_output_removed_cb function
Returns:
0 on success, otherwise a negative error value
Return values:
EOM_ERROR_NONESuccessful
EOM_ERROR_OUT_OF_MEMORYMemory allocation failure
EOM_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
eom_init()
eom_get_eom_output_ids()
See also:
eom_unset_output_removed_cb()
eom_output_removed_cb
int eom_set_output_window ( eom_output_id  output_id,
Evas_Object win 
)

Sets window to the external output best resolution of external output device.

Since :
2.4
Parameters:
[in]output_idThe id of external output device
[in]winThe pointer of evas object
Returns:
0 on success, otherwise a negative error value
Return values:
EOM_ERROR_NONESuccessful
EOM_ERROR_INVALID_PARAMETERInvalid parameter
EOM_ERROR_NO_SUCH_DEVICEInvalid external output instance
EOM_ERROR_MESSAGE_SENDING_FAILURECommunication failure with EOM module
EOM_ERROR_MESSAGE_OPERATION_FAILUREOperation failure
Precondition:
eom_init()
eom_get_eom_output_ids()
See also:
eom_output_id
eom_error_e

Unregisters the callback function.

Since :
2.4
Parameters:
[in]callbackThe function pointer of eom_attribute_changed_cb callback function
Returns:
0 on success, otherwise a negative error value
Return values:
EOM_ERROR_NONESuccessful
EOM_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
eom_init()
eom_get_eom_output_ids()
See also:
eom_set_attribute_changed_cb()
eom_attribute_changed_cb

Unregisters the callback function.

Since :
2.4
Parameters:
[in]callbackThe function pointer of eom_mode_changed_cb callback function
Returns:
0 on success, otherwise a negative error value
Return values:
EOM_ERROR_NONESuccessful
EOM_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
eom_init()
eom_get_eom_output_ids()
See also:
eom_set_mode_changed_cb()
eom_mode_changed_cb

Unregisters the callback function.

Since :
2.4
Parameters:
[in]callbackThe function pointer of eom_output_added_cb callback function
Returns:
0 on success, otherwise a negative error value
Return values:
EOM_ERROR_NONESuccessful
EOM_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
eom_init()
eom_get_eom_output_ids()
See also:
eom_set_output_added_cb()
eom_output_added_cb

Unregisters the callback function.

Since :
2.4
Parameters:
[in]callbackThe function pointer of eom_output_removed_cb callback function
Returns:
0 on success, otherwise a negative error value
Return values:
EOM_ERROR_NONESuccessful
EOM_ERROR_INVALID_PARAMETERInvalid parameter
Precondition:
eom_init()
eom_get_eom_output_ids()
See also:
eom_set_output_removed_cb()
eom_output_removed_cb