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.cpp
20 * @brief This is the implementation for the _AppFrame class.
23 #include <FUiCtrlFrame.h>
25 #include <FBaseSysLog.h>
27 #include "FApp_AppFrame.h"
29 using namespace Tizen::Graphics;
30 using namespace Tizen::Ui;
31 using namespace Tizen::Ui::Controls;
33 namespace Tizen { namespace App
37 _AppFrame::_AppFrame(void)
43 _AppFrame::_AppFrame(Frame& frame)
49 _AppFrame::~_AppFrame(void)
55 _AppFrame::Construct(void)
64 _AppFrame::SetFrame(Frame* pFrame)
75 _AppFrame::GetCanvasN(void) const
77 Canvas* pCanvas = null;
79 SysTryCatch(NID_APP, __pFrame != null, , E_INVALID_STATE, "[E_INVALID_STATE] Frame instance must not be null.");
81 pCanvas = __pFrame->GetCanvasN();
82 SysTryCatch(NID_APP, pCanvas != null, , E_INVALID_STATE, "[E_SYSTEM] Failed while fetching the canvas.");
90 _AppFrame::AddKeyEventListener(IKeyEventListener& listener)
92 SysTryReturn(NID_APP, __pFrame != null, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Frame instance must not be null.");
94 __pFrame->AddKeyEventListener(listener);
101 _AppFrame::RemoveKeyEventListener(IKeyEventListener& listener)
103 SysTryReturnResult(NID_APP, __pFrame != null, E_INVALID_STATE, "Frame instance must not be null.");
105 __pFrame->RemoveKeyEventListener(listener);
112 _AppFrame::AddTouchEventListener(ITouchEventListener& listener)
114 SysTryReturnResult(NID_APP, __pFrame != null, E_INVALID_STATE, "Frame instance must not be null.");
116 __pFrame->AddTouchEventListener(listener);
123 _AppFrame::RemoveTouchEventListener(ITouchEventListener& listener)
125 SysTryReturnResult(NID_APP, __pFrame != null, E_INVALID_STATE, "Frame instance must not be null.");
127 __pFrame->RemoveTouchEventListener(listener);
134 _AppFrame::AddWindowEventListener(IWindowEventListener& listener)
136 SysTryReturnResult(NID_APP, __pFrame != null, E_INVALID_STATE, "Frame instance must not be null.");
138 __pFrame->AddWindowEventListener(listener);
145 _AppFrame::RemoveWindowEventListener(IWindowEventListener& listener)
147 SysTryReturnResult(NID_APP, __pFrame != null, E_INVALID_STATE, "Frame instance must not be null.");
149 __pFrame->RemoveWindowEventListener(listener);
156 _AppFrame::GetFrame(void)