2 // Open Service Platform
3 // Copyright (c) 2012-2013 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 FApp_AppFrame.h
20 * @brief This is the header file for _AppFrame.
23 #ifndef _FAPP_INTERNAL_APP_FRAME_H_
24 #define _FAPP_INTERNAL_APP_FRAME_H_
26 #include <FBaseObject.h>
27 #include <FOspConfig.h>
28 #include <FAppIAppFrame.h>
30 namespace Tizen { namespace Graphics { class Canvas; } }
31 namespace Tizen { namespace Ui { class IKeyEventListener; } }
32 namespace Tizen { namespace Ui { class ITouchEventListener; } }
33 namespace Tizen { namespace Ui { class IWindowEventListener; } }
34 namespace Tizen { namespace Ui { namespace Controls { class Frame; } } }
36 namespace Tizen { namespace App
41 // @brief This is implementation of the application frame.
45 : public Tizen::Base::Object
46 , public virtual IAppFrame
50 _AppFrame(Tizen::Ui::Controls::Frame& pFrame);
53 * Constructs this instance.
55 * @return An error code.
56 * @exception E_SUCCESS - This method is successful.
57 * @exception E_OUT_OF_MEMORY - Memory allocation failed.
58 * @exception E_INVALID_STATE - Already constructed.
59 * @exception E_SYSTEM - System internal error.
61 result Construct(void);
64 * This is a destructor.
66 virtual ~_AppFrame(void);
69 * Gets the application frame's canvas.
73 virtual Tizen::Graphics::Canvas* GetCanvasN(void) const;
76 * Adds a listener for key event.
78 * @param[in] pListener a listener for key event
79 * @return An error code.
80 * @exception E_SUCCESS - This method is successful.
81 * @exception E_OUT_OF_MEMORY - Memory allocation has failed.
83 virtual result AddKeyEventListener(Tizen::Ui::IKeyEventListener& listener);
86 * Removes an existing key event listener.
88 * @param[in] pListener a listener to be removed
89 * @return An error code.
90 * @exception E_SUCCESS - This method is successful.
91 * @exception E_OBJ_NOT_FOUND - The specified object is not found.
93 virtual result RemoveKeyEventListener(Tizen::Ui::IKeyEventListener& listener);
95 virtual result AddTouchEventListener(Tizen::Ui::ITouchEventListener& listener);
97 virtual result RemoveTouchEventListener(Tizen::Ui::ITouchEventListener& listener);
99 virtual result AddWindowEventListener(Tizen::Ui::IWindowEventListener& listener);
101 virtual result RemoveWindowEventListener(Tizen::Ui::IWindowEventListener& listener);
103 virtual Tizen::Ui::Controls::Frame* GetFrame(void);
105 result SetFrame(Tizen::Ui::Controls::Frame* pFrame);
109 * This is a default constructor.
113 _AppFrame(const _AppFrame& value);
115 _AppFrame& operator =(const _AppFrame& value);
118 Tizen::Ui::Controls::Frame* __pFrame;
123 #endif // _FAPP_INTERNAL_APP_FRAME_H_