initialize appwidget when appwidget popup is created
[framework/osp/appwidget-service.git] / inc / FShell_AppWidgetPopupContext.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.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
8 //
9 //     http://floralicense.org/license/
10 //
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.
16 //
17
18 /**
19  * @file        FShell_AppWidgetPopupContext.h
20  * @brief       This is the header file for the %_AppWidgetPopupContext class.
21  *
22  * This header file contains the declarations of the %_AppWidgetPopupContext class.
23  */
24
25 #ifndef _FSHELL_INTERNAL_APPWIDGET_POPUP_CONTEXT_H_
26 #define _FSHELL_INTERNAL_APPWIDGET_POPUP_CONTEXT_H_
27
28 #include "FShell_AppWidgetContextBase.h"
29
30 namespace Tizen { namespace Shell { namespace App
31 {
32
33 class _AppWidgetContext;
34
35 class _AppWidgetPopupContext
36          :public Tizen::Shell::App::_AppWidgetContextBase
37 {
38 public:
39         _AppWidgetPopupContext(const Tizen::Base::String& userInfo, const Tizen::Base::String& appId, const Tizen::Base::String& instanceId, int width, int height, int priority, _AppWidgetContext* pParent);
40         virtual ~_AppWidgetPopupContext();
41
42         // event handler
43         void OnPopupCreated(double x, double y, int width, int height);
44         void OnPopupDestoyed(void);
45
46         // request to app
47         result SendPopupCreateRequest(double x, double y, int width, int height);
48         result SendPopupDestroyRequest();
49         virtual result SendTouchEvent(buffer_event event, double timestamp, double x, double y);
50
51         result RequestUpdateRemote(void);
52
53 private:
54         virtual Tizen::Base::Collection::HashMap* CreateRequestArgs(void);
55
56 private:
57         _AppWidgetContext* __pParent;
58 };
59
60
61 } /* namespace App */
62 } /* namespace AppWidget */
63 } /* namespace Samsung */
64 #endif // _FSHELL_INTERNAL_APPWIDGET_POPUP_CONTEXT_H_