Changed indicator bg color.
[platform/framework/native/uifw.git] / src / ui / FUi_NativeObjectHandler.h
1 #ifndef _FUI_NATIVE_OBJECT_HANDLER_H_
2 #define _FUI_NATIVE_OBJECT_HANDLER_H_
3
4 #include <FBaseTypes.h>
5
6 namespace Tizen { namespace Ui { namespace Animations {
7         class DisplayContext;
8         class VisualElement;
9 }}}
10
11 namespace Tizen { namespace Ui {
12
13 /**
14 * @class                    _NativeObjectHandler
15 * @brief                    This class provides utility methods for helping to handle a native image object.
16 *
17 * @since 2.1
18 *
19 * @final                     This class is not intended for extension.
20 *
21 * The %_NativeObjectHandler class provides utility methods for helping to handle a native image object.
22 */
23 class _OSP_EXPORT_ _NativeObjectHandler
24 {
25 public:
26         /**
27         * Creates a native image object.
28         *
29         * @since 2.1
30         *
31         * @return       The native image object handle.@n
32         *               else @c 0 if an error occurs.
33         * @param[in]    pDisplayContext                       The display context of the window
34         * @param[in]    width                                 The width of the native image object
35         * @param[in]    height                                The height of the native image object
36         * @exception    E_SUCCESS                             The method is successful.
37         * @exception    E_INVALID_ARG                       The specified @c pDisplayContext is invalid.
38         * @exception    E_UNSUPPORTED_OPERATION             This operation is not supported.
39         * @remarks      The specific error code can be accessed using the GetLastResult() method.
40         */
41         static Handle CreateNativeImageObjectN(const Tizen::Ui::Animations::DisplayContext* pDisplayContext, int width, int height);
42
43         /**
44         * Sets a native image object to the visual element.
45         *
46         * @since 2.1
47         *
48         * @return       An error code
49         * @param[in]    pVisualElement                        The visual element to set the native image object
50         * @param[in]    nativeObjectHandle                  The handle of native image object
51         * @exception   E_SUCCESS                                        The method is successful.
52         * @exception    E_INVALID_ARG                       The specified @c pVisualElement or @c pNativeObject is invalid.
53         * @exception    E_UNSUPPORTED_OPERATION             This operation is not supported.
54         */
55         static result SetNativeObjectToVisualElement(Tizen::Ui::Animations::VisualElement* pVisualElement, Handle nativeObjectHandle);
56
57         /**
58         * Sets the show state of the native image object.
59         *
60         * @since 2.1
61         *
62         * @return                  An error code
63         * @param[in]    pNativeObject                  The native image object
64         * @param[in]    show                                               The new show state
65         * @exception    E_SUCCESS                                        The method is successful.
66         * @exception    E_INVALID_ARG                       The specified @c pNativeObject is @c null.
67         * @exception    E_UNSUPPORTED_OPERATION             This operation is not supported.
68         */
69         static result SetNativeObjectShowState(Handle nativeObjectHandle, bool show);
70
71         /**
72         * Deallocates the native image object.
73         *
74         * @since 2.1
75         *
76         * @return                  An error code
77         * @param[in]    pVisualElement                        The display context
78         * @param[in]    pNativeObject                  The native image object
79         * @exception    E_SUCCESS                                        The method is successful.
80         * @exception    E_INVALID_ARG                       The specified @c pVisualElement or @c pNativeObject is invalid.
81         * @exception    E_UNSUPPORTED_OPERATION             This operation is not supported.
82         */
83         static result DestroyNativeObject(Tizen::Ui::Animations::VisualElement* pVisualElement, Handle nativeObjectHandle);
84
85
86 private:
87         //
88         // This default constructor is intentionally declared as private because this class cannot be constructed.
89         //
90         _NativeObjectHandler(void);
91
92         //
93         // This destructor is intentionally declared as private because this class cannot be constructed.
94         //
95         virtual ~_NativeObjectHandler(void);
96
97         //
98         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
99         //
100         // @param[in]    rhs                 An instance of %_NativeObjectHandler
101         //
102         _NativeObjectHandler(const _NativeObjectHandler& rhs);
103
104         //
105         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
106         //
107         // @param[in]    rhs                 An instance of %_NativeObjectHandler
108         //
109         _NativeObjectHandler& operator =(const _NativeObjectHandler& rhs);
110 }; //_NativeObjectHandler
111 }}  // namespace Tizen { namespace Ui {
112
113 #endif //_FUI_NATIVE_OBJECT_HANDLER_H_