2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://floralicense.org/license/
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 FShell_AppWidgetContext.h
20 * @brief This is the header file for the _AppWidgetContext class.
22 * This header file contains the declarations of the _AppWidgetContext class.
25 #ifndef _FSHELL_INTERNAL_APPWIDGET_CONTEXT_H_
26 #define _FSHELL_INTERNAL_APPWIDGET_CONTEXT_H_
29 #include <provider_buffer.h>
31 #include <FAppTypes.h>
32 #include <FBaseRtTimer.h>
33 #include <FBaseObject.h>
34 #include <FBaseColArrayListT.h>
36 #include "FShell_AppWidgetContextBase.h"
39 #define MAX_PACKAGENAME 512
42 namespace Tizen { namespace Shell { namespace App
44 class _AppWidgetPopupContext;
46 class _AppWidgetContext
47 : public _AppWidgetContextBase
48 ,public Tizen::Base::Runtime::ITimerEventListener
51 _AppWidgetContext(const Tizen::Base::String& name, const Tizen::Base::String& appId, const Tizen::Base::String& instanceId,
52 int width, int height, int period, int priority);
53 virtual ~_AppWidgetContext();
55 void OnUpdate(const Tizen::Base::String& argument);
56 void OnResize(int width, int height);
61 virtual void OnPopupCreated(double x, double y, int width, int height);
62 virtual void OnPopupDestoyed(void);
64 result RequestUpdateRemote(int width, int height);
66 _AppWidgetPopupContext* GetAppWidgetPopup() const;
67 virtual result SendTouchEvent(buffer_event event, double timestamp, double x, double y);
69 // void RestartLifeDurationTimer();
72 result SendAddRequest(int width, int height);
73 result SendUpdateRequest(int width, int height, const Tizen::Base::String& argument);
74 result SendResizeRequest(int width, int height);
75 result SendRemoveRequest();
77 result SendRequestToApp(const Tizen::App::AppId& appId, const Tizen::Base::String& operation, Tizen::Base::Collection::HashMap* pArgs);
78 void SendPendingTouchEvent(void);
80 virtual Tizen::Base::Collection::HashMap* CreateRequestArgs(void);
82 virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
84 struct PendingTouchEvent
87 PendingTouchEvent(int eventType, double timeStamp, double x, double y)
88 : eventType(eventType), timeStamp(timeStamp), x(x), y(y) { }
97 _AppWidgetPopupContext* __pAppWidgetPopup;
98 // Tizen::Base::Runtime::Timer __lifeDurationTimer;
99 Tizen::Base::Runtime::Timer __updateTimer;
101 Tizen::Base::Collection::ArrayListT<PendingTouchEvent*>* __pPendingTouchEventList;
105 } } } // Tizen::Shell::App {
108 #endif // _FSHELL_INTERNAL_APPWIDGET_CONTEXT_H_