2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FAppIAppFrame.h
20 * @brief This is the header file for the %IAppFrame interface.
22 * This header file contains the declarations of the %IAppFrame interface.
25 #ifndef _FAPP_IAPP_FRAME_H_
26 #define _FAPP_IAPP_FRAME_H_
28 namespace Tizen { namespace Graphics { class Canvas; } }
29 namespace Tizen { namespace Ui { class IKeyEventListener; } }
30 namespace Tizen { namespace Ui { class ITouchEventListener; } }
31 namespace Tizen { namespace Ui { class IWindowEventListener; } }
32 namespace Tizen { namespace Ui { namespace Controls { class Frame; } } }
34 namespace Tizen { namespace App
38 * @interface IAppFrame
39 * @brief This interface provides methods for the application frame.
43 * The %IAppFrame interface provides methods for the application frame. A frame is the outermost boundary of the application UI.
49 * This polymorphic destructor should be overridden if required.
50 * This way, the destructors of the derived classes are called when the destructor of this interface is called.
54 virtual ~IAppFrame(void) {}
57 * Gets the values of the frame's canvas.
61 * @return A pointer to the Tizen::Graphics::Canvas class
63 virtual Tizen::Graphics::Canvas* GetCanvasN(void) const = 0;
66 * Adds a key event listener to the frame.
70 * @return An error code
71 * @param[in] listener A Tizen::Ui::IKeyEventListener instance to add
72 * @exception E_SUCCESS The method is successful.
74 virtual result AddKeyEventListener(Tizen::Ui::IKeyEventListener& listener) = 0;
77 * Removes an existing key event listener from the frame.
81 * @return An error code
82 * @param[in] listener A Tizen::Ui::IKeyEventListener instance to remove
83 * @exception E_SUCCESS The method is successful.
85 virtual result RemoveKeyEventListener(Tizen::Ui::IKeyEventListener& listener) = 0;
88 * Adds a touch event listener to the frame.
92 * @return An error code
93 * @param[in] listener A Tizen::Ui::ITouchEventListener instance to add
94 * @exception E_SUCCESS The method is successful.
96 virtual result AddTouchEventListener(Tizen::Ui::ITouchEventListener& listener) = 0;
99 * Removes an existing touch event listener from the frame.
103 * @return An error code
104 * @param[in] listener A Tizen::Ui::ITouchEventListener instance to add
105 * @exception E_SUCCESS The method is successful.
107 virtual result RemoveTouchEventListener(Tizen::Ui::ITouchEventListener& listener) = 0;
110 * Adds a window event listener to the frame.
114 * @return An error code
115 * @param[in] listener A Tizen::Ui::IWindowEventListener instance to remove
116 * @exception E_SUCCESS The method is successful.
118 virtual result AddWindowEventListener(Tizen::Ui::IWindowEventListener& listener) = 0;
121 * Removes an existing window event listener from the frame.
125 * @return An error code
126 * @param[in] listener A Tizen::Ui::IWindowEventListener instance to remove
127 * @exception E_SUCCESS The method is successful.
129 virtual result RemoveWindowEventListener(Tizen::Ui::IWindowEventListener& listener) = 0;
132 * Gets the frame of the application.
136 * @return A pointer to Tizen::Ui::Controls::Frame if successful, @n
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 cannot be supported.
141 * @remarks The specific error code can be accessed using the GetLastResult() method.
143 virtual Tizen::Ui::Controls::Frame* GetFrame(void) = 0;
149 #endif // _FAPP_IAPP_FRAME_H_