Move system-server under server/system.
[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. A frame is the outermost boundary of the application UI.
43  */
44 class IAppFrame
45 {
46 public:
47         /**
48          * This polymorphic destructor should be overridden if required.
49          * This way, the destructors of the derived classes are called when the destructor of this interface is called.
50          *
51          * @since       2.0
52          */
53         virtual ~IAppFrame(void) {}
54
55         /**
56          * Gets the values of the frame's canvas.
57          *
58          * @since       2.0
59          *
60          * @return      A pointer to the Tizen::Graphics::Canvas class
61          */
62         virtual Tizen::Graphics::Canvas* GetCanvasN(void) const = 0;
63
64         /**
65          * Adds a key event listener to the frame.
66          *
67          * @since       2.0
68          *
69          * @return      An error code
70          * @param[in]   listener        A Tizen::Ui::IKeyEventListener instance to add
71          * @exception   E_SUCCESS                       The method is successful.
72          */
73         virtual result AddKeyEventListener(Tizen::Ui::IKeyEventListener& listener) = 0;
74
75         /**
76          * Removes an existing key event listener from the frame.
77          *
78          * @since       2.0
79          *
80          * @return      An error code
81          * @param[in]   listener        A Tizen::Ui::IKeyEventListener instance to remove
82          * @exception   E_SUCCESS       The method is successful.
83          */
84         virtual result RemoveKeyEventListener(Tizen::Ui::IKeyEventListener& listener) = 0;
85
86         /**
87          * Adds a touch event listener to the frame.
88          *
89          * @since       2.0
90          *
91          * @return      An error code
92          * @param[in]   listener        A Tizen::Ui::ITouchEventListener instance to add
93          * @exception   E_SUCCESS                       The method is successful.
94          */
95         virtual result AddTouchEventListener(Tizen::Ui::ITouchEventListener& listener) = 0;
96
97         /**
98          * Removes an existing touch event listener from the frame.
99          *
100          * @since       2.0
101          *
102          * @return      An error code
103          * @param[in]   listener        A Tizen::Ui::ITouchEventListener instance to add
104          * @exception   E_SUCCESS       The method is successful.
105          */
106         virtual result RemoveTouchEventListener(Tizen::Ui::ITouchEventListener& listener) = 0;
107
108         /**
109          * Adds a window event listener to the frame.
110          *
111          * @since       2.0
112          *
113          * @return      An error code
114          * @param[in]   listener        A Tizen::Ui::IWindowEventListener instance to remove
115          * @exception   E_SUCCESS                       The method is successful.
116          */
117         virtual result AddWindowEventListener(Tizen::Ui::IWindowEventListener& listener) = 0;
118
119         /**
120          * Removes an existing window event listener from the frame.
121          *
122          * @since       2.0
123          *
124          * @return      An error code
125          * @param[in]   listener        A Tizen::Ui::IWindowEventListener instance to remove
126          * @exception   E_SUCCESS       The method is successful.
127          */
128         virtual result RemoveWindowEventListener(Tizen::Ui::IWindowEventListener& listener) = 0;
129
130         /**
131          * Gets the frame of the application.
132          *
133          * @since       2.0
134          *
135          * @return              A pointer to Tizen::Ui::Controls::Frame if successful, @n
136          *              else @c null
137          * @exception   E_SUCCESS       The method is successful.
138          * @exception   E_INVALID_STATE This instance is in an invalid state.
139          * @exception   E_UNSUPPORTED_OPERATION This method cannot be supported.
140          * @remarks             The specific error code can be accessed using the GetLastResult() method.
141          */
142         virtual Tizen::Ui::Controls::Frame* GetFrame(void) = 0;
143
144 }; // IAppFrame
145
146 } } // Tizen::App
147
148 #endif // _FAPP_IAPP_FRAME_H_