Enable build with iniparser v 3.1
[platform/framework/native/appfw.git] / inc / FAppIAppFrame.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16
17 /**
18  * @file                FAppIAppFrame.h
19  * @brief               This is the header file for the %IAppFrame interface.
20  *
21  * This header file contains the declarations of the %IAppFrame interface.
22  */
23
24 #ifndef _FAPP_IAPP_FRAME_H_
25 #define _FAPP_IAPP_FRAME_H_
26
27 namespace Tizen { namespace Graphics { class Canvas; } }
28 namespace Tizen { namespace Ui { class IKeyEventListener; } }
29 namespace Tizen { namespace Ui { class ITouchEventListener; } }
30 namespace Tizen { namespace Ui { class IWindowEventListener; } }
31 namespace Tizen { namespace Ui { namespace Controls { class Frame; } } }
32
33 namespace Tizen { namespace App
34 {
35
36 /**
37  * @interface   IAppFrame
38  * @brief               This interface provides methods for the application frame.
39  *
40  * @since       2.0
41  *
42  * The %IAppFrame interface provides methods for the application frame.
43  * A frame is the outermost boundary of the application UI.
44  */
45 class IAppFrame
46 {
47 public:
48         /**
49          * This polymorphic destructor should be overridden if required. @n
50          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
51          *
52          * @since       2.0
53          */
54         virtual ~IAppFrame(void) {}
55
56         /**
57          * Gets the values of the frame's canvas.
58          *
59          * @since       2.0
60          *
61          * @return      A pointer to the Tizen::Graphics::Canvas instance
62          */
63         virtual Tizen::Graphics::Canvas* GetCanvasN(void) const = 0;
64
65         /**
66          * Adds a key event listener to the frame.
67          *
68          * @since       2.0
69          *
70          * @return              An error code
71          * @param[in]   listener                        An instance of Tizen::Ui::IKeyEventListener to add
72          * @exception   E_SUCCESS                       The method is successful.
73          */
74         virtual result AddKeyEventListener(Tizen::Ui::IKeyEventListener& listener) = 0;
75
76         /**
77          * Removes an existing key event listener from the frame.
78          *
79          * @since       2.0
80          *
81          * @return              An error code
82          * @param[in]   listener        An instance of Tizen::Ui::IKeyEventListener to remove
83          * @exception   E_SUCCESS       The method is successful.
84          */
85         virtual result RemoveKeyEventListener(Tizen::Ui::IKeyEventListener& listener) = 0;
86
87         /**
88          * Adds a touch event listener to the frame.
89          *
90          * @since       2.0
91          *
92          * @return              An error code
93          * @param[in]   listener                An instance of Tizen::Ui::ITouchEventListener to add
94          * @exception   E_SUCCESS               The method is successful.
95          */
96         virtual result AddTouchEventListener(Tizen::Ui::ITouchEventListener& listener) = 0;
97
98         /**
99          * Removes an existing touch event listener from the frame.
100          *
101          * @since       2.0
102          *
103          * @return              An error code
104          * @param[in]   listener        An instance of Tizen::Ui::ITouchEventListener to add
105          * @exception   E_SUCCESS       The method is successful.
106          */
107         virtual result RemoveTouchEventListener(Tizen::Ui::ITouchEventListener& listener) = 0;
108
109         /**
110          * Adds a window event listener to the frame.
111          *
112          * @since       2.0
113          *
114          * @return              An error code
115          * @param[in]   listener                        An instance of Tizen::Ui::IWindowEventListener to remove
116          * @exception   E_SUCCESS                       The method is successful.
117          */
118         virtual result AddWindowEventListener(Tizen::Ui::IWindowEventListener& listener) = 0;
119
120         /**
121          * Removes an existing window event listener from the frame.
122          *
123          * @since       2.0
124          *
125          * @return              An error code
126          * @param[in]   listener        An instance of Tizen::Ui::IWindowEventListener to remove
127          * @exception   E_SUCCESS       The method is successful.
128          */
129         virtual result RemoveWindowEventListener(Tizen::Ui::IWindowEventListener& listener) = 0;
130
131         /**
132          * Gets the frame of the application.
133          *
134          * @since       2.0
135          *
136          * @return              A pointer to the Tizen::Ui::Controls::Frame instance, @n
137          *              else @c null if it fails
138          * @exception   E_SUCCESS                               The method is successful.
139          * @exception   E_INVALID_STATE                 This instance is in an invalid state.
140          * @exception   E_UNSUPPORTED_OPERATION This method is not supported.
141          * @remarks             The specific error code can be accessed using the GetLastResult() method.
142          */
143         virtual Tizen::Ui::Controls::Frame* GetFrame(void) = 0;
144
145 }; // IAppFrame
146
147 } } // Tizen::App
148
149 #endif // _FAPP_IAPP_FRAME_H_