diff options
author | SooChan Lim <sc1.lim@samsung.com> | 2015-06-05 16:22:36 +0900 |
---|---|---|
committer | SooChan Lim <sc1.lim@samsung.com> | 2015-06-05 16:23:11 +0900 |
commit | 55564857683db2936c2ced45f2e60314a0e41064 (patch) | |
tree | 3b5924a9e201670f6412738eac0e18a7c437baeb /include | |
parent | 4021d47b6818966447fa0912b20af0ec48480fa1 (diff) | |
download | libeom-55564857683db2936c2ced45f2e60314a0e41064.tar.gz libeom-55564857683db2936c2ced45f2e60314a0e41064.tar.bz2 libeom-55564857683db2936c2ced45f2e60314a0e41064.zip |
add initial version
Change-Id: I4cae25573ba0d886aada7109c384379485700eb7
Diffstat (limited to 'include')
-rwxr-xr-x | include/Makefile.am | 34 | ||||
-rwxr-xr-x | include/eom-connect.h | 75 | ||||
-rwxr-xr-x | include/eom.h | 503 | ||||
-rw-r--r-- | include/eom.pc.in | 12 | ||||
-rw-r--r-- | include/eom_internal.h | 52 |
5 files changed, 676 insertions, 0 deletions
diff --git a/include/Makefile.am b/include/Makefile.am new file mode 100755 index 0000000..d1a7d86 --- /dev/null +++ b/include/Makefile.am @@ -0,0 +1,34 @@ +# Copyright 2014 Samsung Electronics co., Ltd. All Rights Reserved. +# +# Contact: +# SooChan Lim <sc1.lim@samsung.com> +# Boram Park <boram1288.park@samsung.com> +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sub license, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice (including the +# next paragraph) shall be included in all copies or substantial portions +# of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +# IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +libeomincludedir = $(includedir)/eom +libeominclude_HEADERS = \ + eom.h \ + eom_internal.h \ + eom-connect.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = eom.pc diff --git a/include/eom-connect.h b/include/eom-connect.h new file mode 100755 index 0000000..4cd8d8a --- /dev/null +++ b/include/eom-connect.h @@ -0,0 +1,75 @@ +/************************************************************************** + +eom (external output manager) + +Copyright 2014 Samsung Electronics co., Ltd. All Rights Reserved. + +Contact: +SooChan Lim <sc1.lim@samsung.com> +Boram Park <boram1288.park@samsung.com> +Changyeon Lee <cyeon.lee@samsung.com> + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +#ifndef __EOM_CONNECT_H__ +#define __EOM_CONNECT_H__ + +/** + * @ingroup + * @addtogroup CAPI_UI_EOM_MODULE + * @{ + */ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <eom.h> + +/** + * @file eom-connect.h + */ + +/** + * @brief Set mode to external output. + * @param[in] output : The pointer of external output instance + * @param[in] output_id : eom output id + * @return #EOM_ERROR_NONE if this function succeeds, otherwise error status value + * @retval #EOM_ERROR_NONE Successful + * @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #EOM_ERROR_SEND_MESSAGE_FAILE Message sending failure + * @retval #EOM_ERROR_OPERATE_MESSAGE_FAILE Message operation failure + * see #eom_output_mode_e + */ +int eom_output_set_mode (eom_output_id output_id, eom_output_mode_e mode); + + +#ifdef __cplusplus +} +#endif + +/** +* @} +*/ + +#endif /* __EOM_CONNECT_H__ */ diff --git a/include/eom.h b/include/eom.h new file mode 100755 index 0000000..55f3d17 --- /dev/null +++ b/include/eom.h @@ -0,0 +1,503 @@ +/************************************************************************** + +External Output Manager (EOM) + +Copyright 2014 Samsung Electronics co., Ltd. All Rights Reserved. + +Contact: +SooChan Lim <sc1.lim@samsung.com> +Boram Park <boram1288.park@samsung.com> +Changyeon Lee <cyeon.lee@samsung.com> +JunKyeong Kim <jk0430.kim@samsung.com> + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +#ifndef __EOM_H__ +#define __EOM_H__ + +/** + * @addtogroup CAPI_UI_EOM_MODULE + * @{ + */ + +#ifdef __cplusplus +extern "C" { +#endif + +#include <stdint.h> +#include <stddef.h> +#include <stdbool.h> +#include <string.h> +#include <tizen.h> +#include <Elementary.h> + +/** + * @file eom.h + */ +#ifndef TIZEN_ERROR_EOM +#define TIZEN_ERROR_EOM -0x02F20000 | 0x00 +#endif +/** + * @brief Enumeration of External Output Manager (EOM) error type + * @since_tizen 2.4 + */ +typedef enum +{ + EOM_ERROR_NONE = TIZEN_ERROR_NONE, /**< Success */ + EOM_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Memory allocation failure */ + EOM_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid input parameter */ + EOM_ERROR_NO_SUCH_DEVICE = TIZEN_ERROR_NO_SUCH_DEVICE, /**< Invalid external output instance */ + EOM_ERROR_CONNECTION_FAILURE = TIZEN_ERROR_EOM | 0x01, /**< Connection failure */ + EOM_ERROR_MESSAGE_SENDING_FAILURE = TIZEN_ERROR_EOM | 0x02, /**< Message sending failure */ + EOM_ERROR_MESSAGE_OPERATION_FAILURE = TIZEN_ERROR_EOM | 0x03, /**< Message operation failure */ +} eom_error_e; + +/** + * @brief Enumeration of external output type + * @since_tizen 2.4 + */ +typedef enum +{ + 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 */ + EOM_OUTPUT_TYPE_MAX, +} eom_output_type_e; + +/** + * @brief Enumeration of external output mode + * @since_tizen 2.4 + */ +typedef enum +{ + EOM_OUTPUT_MODE_NONE, /**< None */ + EOM_OUTPUT_MODE_MIRROR, /**< Mirror mode */ + EOM_OUTPUT_MODE_PRESENTATION, /**< Presentation mode */ + EOM_OUTPUT_MODE_MAX, +} eom_output_mode_e; + +/** + * @brief Enumeration of External Output Manager (EOM) attributes + * @since_tizen 2.4 + */ +typedef enum +{ + 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 */ + EOM_OUTPUT_ATTRIBUTE_MAX, +} eom_output_attribute_e; + +/** + * @brief Enumeration of External Output Manager (EOM) attribute state + * @since_tizen 2.4 + */ +typedef enum +{ + 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 */ + EOM_OUTPUT_ATTRIBUTE_STATE_MAX, +} eom_output_attribute_state_e; + +/** + * @brief Definition for external output ID + * @since_tizen 2.4 + */ +typedef unsigned int eom_output_id; + +/** + * @brief Called when External Output Manager (EOM) module sends output connection notification. + * @since_tizen 2.4 + * @param[in] output_id The output id which is connected output + * @param[in] user_data The pointer of user data which is passed to eom_output_added_cb function + * @see eom_set_output_added_cb() + * @see eom_unset_output_added_cb() + */ +typedef void (*eom_output_added_cb)(eom_output_id output_id, void *user_data); + +/** + * @brief Called when External Output Manager (EOM) module sends output disconnection notification. + * @since_tizen 2.4 + * @param[in] output_id The output id which is connected output + * @param[in] user_data The pointer of user data which is passed to eom_output_removed_cb function + * @see eom_set_output_removed_cb() + * @see eom_unset_output_removed_cb() + */ +typedef void (*eom_output_removed_cb)(eom_output_id output_id, void *user_data); + +/** + * @brief Called when External Output Manager (EOM) module sends output mode changing notification. + * @since_tizen 2.4 + * @param[in] output_id The output id which is connected output + * @param[in] user_data The pointer of user data which is passed to eom_mode_changed_cb function + * @see eom_set_mode_changed_cb() + * @see eom_unset_mode_changed_cb() + */ +typedef void (*eom_mode_changed_cb)(eom_output_id output_id, void *user_data); + +/** + * @brief Called when External Output Manager (EOM) module sends output attribute changing notification. + * @since_tizen 2.4 + * @param[in] output_id The output id which is connected output + * @param[in] user_data The pointer of user data which is passed to eom_attribute_changed_cb function + * @see eom_set_attribute_changed_cb() + * @see eom_unset_attribute_changed_cb() + */ +typedef void (*eom_attribute_changed_cb)(eom_output_id output_id, void *user_data); + +/** + * @brief Initializes External Output Manager (EOM). + * @details User should call this function previously for using EOM. + * @since_tizen 2.4 + * @remarks After all using, call eom_deinit() function for resource returning. + * @return 0 on success, otherwise a negative error value + * @retval #EOM_ERROR_NONE Successful + * @retval #EOM_ERROR_CONNECTION_FAILURE The EOM connection failure + * @see eom_deinit() + * @see #eom_error_e + */ +int eom_init (void); + +/** + * @brief Finalizes External Output Manager (EOM). + * @details User should call this function after using EOM to release all resources of EOM. + * @since_tizen 2.4 + * @see eom_init() + */ +void eom_deinit (void); + +/** + * @brief Registers a callback function to get output connection notification from External Output Manager (EOM) module. + * @since_tizen 2.4 + * @param[in] callback The function pointer of eom_output_added_cb callback function + * @param[in] user_data The pointer of user data which is passed to eom_output_added_cb function + * @return 0 on success, otherwise a negative error value + * @retval #EOM_ERROR_NONE Successful + * @retval #EOM_ERROR_OUT_OF_MEMORY Memory allocation failure + * @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter + * @pre eom_init() + * @pre eom_get_eom_output_ids() + * @see eom_unset_output_added_cb() + * @see #eom_output_added_cb + */ +int eom_set_output_added_cb (eom_output_added_cb callback, void *user_data); + +/** + * @brief Unregisters the callback function. + * @since_tizen 2.4 + * @param[in] callback The function pointer of eom_output_added_cb callback function + * @return 0 on success, otherwise a negative error value + * @retval #EOM_ERROR_NONE Successful + * @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter + * @pre eom_init() + * @pre eom_get_eom_output_ids() + * @see eom_set_output_added_cb() + * @see #eom_output_added_cb + */ +int eom_unset_output_added_cb (eom_output_added_cb callback); + +/** + * @brief Registers a callback function to get output disconnection notification from External Output Manager (EOM) module. + * @since_tizen 2.4 + * @param[in] callback The function pointer of eom_output_removed_cb callback function + * @param[in] user_data The pointer of user data which is passed to eom_output_removed_cb function + * @return 0 on success, otherwise a negative error value + * @retval #EOM_ERROR_NONE Successful + * @retval #EOM_ERROR_OUT_OF_MEMORY Memory allocation failure + * @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter + * @pre eom_init() + * @pre eom_get_eom_output_ids() + * @see eom_unset_output_removed_cb() + * @see #eom_output_removed_cb + */ +int eom_set_output_removed_cb (eom_output_removed_cb callback, void *user_data); + +/** + * @brief Unregisters the callback function. + * @since_tizen 2.4 + * @param[in] callback The function pointer of eom_output_removed_cb callback function + * @return 0 on success, otherwise a negative error value + * @retval #EOM_ERROR_NONE Successful + * @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter + * @pre eom_init() + * @pre eom_get_eom_output_ids() + * @see eom_set_output_removed_cb() + * @see #eom_output_removed_cb + */ +int eom_unset_output_removed_cb (eom_output_removed_cb callback); + +/** + * @brief Registers a callback function to get output mode changing notification from External Output Manager (EOM) module. + * @since_tizen 2.4 + * @param[in] callback The function pointer of eom_mode_changed_cb callback function + * @param[in] user_data The pointer of user data which is passed to eom_mode_changed_cb function + * @return 0 on success, otherwise a negative error value + * @retval #EOM_ERROR_NONE Successful + * @retval #EOM_ERROR_OUT_OF_MEMORY Memory allocation failure + * @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter + * @pre eom_init() + * @pre eom_get_eom_output_ids() + * @see eom_unset_mode_changed_cb() + * @see #eom_mode_changed_cb + */ +int eom_set_mode_changed_cb (eom_mode_changed_cb callback, void *user_data); + +/** + * @brief Unregisters the callback function. + * @since_tizen 2.4 + * @param[in] callback The function pointer of eom_mode_changed_cb callback function + * @return 0 on success, otherwise a negative error value + * @retval #EOM_ERROR_NONE Successful + * @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter + * @pre eom_init() + * @pre eom_get_eom_output_ids() + * @see eom_set_mode_changed_cb() + * @see #eom_mode_changed_cb + */ +int eom_unset_mode_changed_cb (eom_mode_changed_cb callback); + +/** + * @brief Registers a callback function to get output attribute changing notification from External Output Manager (EOM) module. + * @since_tizen 2.4 + * @param[in] callback The function pointer of eom_attribute_changed_cb callback function + * @param[in] user_data The pointer of user data which is passed to eom_attribute_changed_cb function + * @return 0 on success, otherwise a negative error value + * @retval #EOM_ERROR_NONE Successful + * @retval #EOM_ERROR_OUT_OF_MEMORY Memory allocation failure + * @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter + * @pre eom_init() + * @pre eom_get_eom_output_ids() + * @see eom_unset_attribute_changed_cb() + * @see #eom_attribute_changed_cb + */ +int eom_set_attribute_changed_cb (eom_attribute_changed_cb callback, void *user_data); + +/** + * @brief Unregisters the callback function. + * @since_tizen 2.4 + * @param[in] callback The function pointer of eom_attribute_changed_cb callback function + * @return 0 on success, otherwise a negative error value + * @retval #EOM_ERROR_NONE Successful + * @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter + * @pre eom_init() + * @pre eom_get_eom_output_ids() + * @see eom_set_attribute_changed_cb() + * @see #eom_attribute_changed_cb + */ +int eom_unset_attribute_changed_cb (eom_attribute_changed_cb callback); + +/** + * @brief Gets the IDs and count of external output. + * @details 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_tizen 2.4 + * @remarks User should free return value by using free().\n + * The specific error code can be obtained using the get_last_result() method. + * Error codes are described in Exception section. + * @param[out] count The count of the eom_output_id supported by system + * @return The array of the eom_output_id if this function succeeds, otherwise NULL + * @retval The pointer of #eom_output_id + * @exception #EOM_ERROR_NONE Successful + * @exception #EOM_ERROR_INVALID_PARAMETER Invalid parameter + * @exception #EOM_ERROR_OUT_OF_MEMORY Memory allocation failure + * @pre eom_init() + * @see #eom_output_id + * @see #eom_error_e + */ +eom_output_id* eom_get_eom_output_ids (int *count); + +/** + * @brief Gets type of external output. + * @since_tizen 2.4 + * @remarks The specific error code can be obtained using the get_last_result() + * method. Error codes are described in Exception section. + * @param[in] output_id The id of external output device + * @param[out] type The type of external output instance + * @return 0 on success, otherwise a negative error value + * @retval #EOM_ERROR_NONE Successful + * @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter + * @pre eom_init() + * @pre eom_get_eom_output_ids() + * @see #eom_output_id + * @see #eom_error_e + * @see #eom_output_type_e + */ +int eom_get_output_type (eom_output_id output_id, eom_output_type_e *type); + +/** + * @brief Gets mode of external output. + * @since_tizen 2.4 + * @remarks The specific error code can be obtained using the get_last_result() + * method. Error codes are described in Exception section. + * @param[in] output_id The id of external output device + * @param[out] mode The mode of external output instance + * @return 0 on success, otherwise a negative error value + * @retval #EOM_ERROR_NONE Successful + * @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance + * @pre eom_init() + * @pre eom_get_eom_output_ids() + * @see #eom_output_id + * @see #eom_error_e + * @see #eom_output_mode_e + */ +int eom_get_output_mode (eom_output_id output_id, eom_output_mode_e *mode); + +/** + * @brief Gets attribute of external output. + * @since_tizen 2.4 + * @remarks The specific error code can be obtained using the get_last_result() + * method. Error codes are described in Exception section. + * @param[in] output_id The id of external output device + * @param[out] attribute The attribute of external output instance + * @return 0 on success, otherwise a negative error value + * @retval #EOM_ERROR_NONE Successful + * @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance + * @pre eom_init() + * @pre eom_get_eom_output_ids() + * @see #eom_output_id + * @see #eom_error_e + * @see #eom_output_attribute_e + */ +int eom_get_output_attribute (eom_output_id output_id, eom_output_attribute_e *attribute); + +/** + * @brief Gets attribute state of external output. + * @since_tizen 2.4 + * @remarks The specific error code can be obtained using the get_last_result() + * method. Error codes are described in Exception section. + * @param[in] output_id The id of external output device + * @param[out] state The attribute state of external output instance + * @return 0 on success, otherwise a negative error value + * @retval #EOM_ERROR_NONE Successful + * @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance + * @pre eom_init() + * @pre eom_get_eom_output_ids() + * @see #eom_output_id + * @see #eom_error_e + * @see #eom_output_attribute_state_e + */ +int eom_get_output_attribute_state (eom_output_id output_id, eom_output_attribute_state_e *state); + +/** + * @brief Gets resolution of external output. + * @since_tizen 2.4 + * @param[in] output_id The id of external output device + * @param[out] width The width of external output instance + * @param[out] height The height of external output instance + * @return 0 on success, otherwise a negative error value + * @retval #EOM_ERROR_NONE Successful + * @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance + * @pre eom_init() + * @pre eom_get_eom_output_ids() + * @see #eom_output_id + * @see #eom_error_e + */ +int eom_get_output_resolution (eom_output_id output_id, int *width, int *height); + +/** + * @brief Gets physical width/height (millimeters) of external output. + * @since_tizen 2.4 + * @param[in] output_id The id of external output device + * @param[out] phy_width The physical mm width of external output instance + * @param[out] phy_height The physical mm height of external output instance + * @return 0 on success, otherwise a negative error value + * @retval #EOM_ERROR_NONE Successful + * @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #EOM_ERROR_NO_SUCH_DEVICE Invalid external output instance + * @pre eom_init() + * @pre eom_get_eom_output_ids() + * @see #eom_output_id + * @see #eom_error_e + */ +int eom_get_output_physical_size (eom_output_id output_id, int *phy_width, int *phy_height); + +/** + * @brief Sets the attribute of the external output ID. + * @details 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_tizen 2.4 + * @param[in] output_id The id of external output device + * @param[in] attr The attribute of the external output + * @return 0 on success, otherwise a negative error value + * @retval #EOM_ERROR_NONE Successful + * @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #EOM_ERROR_MESSAGE_SENDING_FAILURE Communication failure with EOM module + * @retval #EOM_ERROR_MESSAGE_OPERATION_FAILURE Operation failure + * @pre eom_init() + * @pre eom_get_eom_output_ids() + * @see #eom_output_id + * @see #eom_error_e + */ +int eom_set_output_attribute (eom_output_id output_id, eom_output_attribute_e attr); + +/** + * @brief Sets window to the external output best resolution of external output device. + * @since_tizen 2.4 + * @param[in] output_id The id of external output device + * @param[in] win The pointer of evas object + * @return 0 on success, otherwise a negative error value + * @retval #EOM_ERROR_NONE Successful + * @retval #EOM_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #EOM_ERROR_MESSAGE_SENDING_FAILURE Communication failure with EOM module + * @retval #EOM_ERROR_MESSAGE_OPERATION_FAILURE Operation failure + * @pre eom_init() + * @pre eom_get_eom_output_ids() + * @see #eom_output_id + * @see #eom_error_e + */ +int eom_set_output_window (eom_output_id output_id, Evas_Object *win); + +#ifdef __cplusplus +} +#endif + +/** +* @} +*/ + +#endif /* __EOM_H__ */ diff --git a/include/eom.pc.in b/include/eom.pc.in new file mode 100644 index 0000000..b795246 --- /dev/null +++ b/include/eom.pc.in @@ -0,0 +1,12 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: eom +Description: The External Output Manager debug Library +Version: @PACKAGE_VERSION@ +Requires.private: dbus-1 gio-unix-2.0 +Requires: capi-base-common +Cflags: -I${includedir}/eom +Libs: -L${libdir} -leom diff --git a/include/eom_internal.h b/include/eom_internal.h new file mode 100644 index 0000000..dd750d0 --- /dev/null +++ b/include/eom_internal.h @@ -0,0 +1,52 @@ +/************************************************************************** + +eom (external output manager) + +Copyright 2014 Samsung Electronics co., Ltd. All Rights Reserved. + +Contact: +SooChan Lim <sc1.lim@samsung.com> +Boram Park <boram1288.park@samsung.com> +Changyeon Lee <cyeon.lee@samsung.com> +JunKyeong Kim <jk0430.kim@samsung.com> + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sub license, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice (including the +next paragraph) shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. +IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +**************************************************************************/ + +#ifndef __EOM_INTERNAL_H__ +#define __EOM_INTERNAL_H__ + +/** + * @brief Enumeration of eom notify type + * @since_tizen 2.4 + */ +typedef enum +{ + EOM_OUTPUT_NOTIFY_NONE, /**< None notify */ + EOM_OUTPUT_NOTIFY_ADD, /**< Output add notify */ + EOM_OUTPUT_NOTIFY_REMOVE, /**< Output remove notify */ + EOM_OUTPUT_NOTIFY_MODE_CHANGED, /**< Mode change notify */ + EOM_OUTPUT_NOTIFY_ATTRIBUTE_CHANGED, /**< Attribute change notify */ + EOM_OUTPUT_NOTIFY_MAX, +} eom_output_notify_type_e; + +#endif /* __EOM_INTERNAL_H__ */ |