2 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file FShell_AppWidgetContext.h
19 * @brief This is the header file for the _AppWidgetContext class.
21 * This header file contains the declarations of the _AppWidgetContext class.
24 #ifndef _FSHELL_INTERNAL_APPWIDGET_CONTEXT_H_
25 #define _FSHELL_INTERNAL_APPWIDGET_CONTEXT_H_
28 #include <provider_buffer.h>
30 #include <FAppTypes.h>
31 #include <FBaseRtTimer.h>
32 #include <FBaseObject.h>
33 #include <FBaseColArrayListT.h>
35 #include "FShell_AppWidgetContextBase.h"
38 #define MAX_PACKAGENAME 512
41 namespace Tizen { namespace Shell { namespace App
43 class _AppWidgetPopupContext;
45 class _AppWidgetContext
46 : public _AppWidgetContextBase
47 ,public Tizen::Base::Runtime::ITimerEventListener
50 _AppWidgetContext(const Tizen::Base::String& name, const Tizen::Base::String& appId, const Tizen::Base::String& instanceId,
51 int width, int height, int period, int priority);
52 virtual ~_AppWidgetContext();
54 void OnUpdate(const Tizen::Base::String& argument);
55 void OnResize(int width, int height);
60 virtual void OnPopupCreated(double x, double y, int width, int height);
61 virtual void OnPopupDestoyed(void);
63 result RequestUpdateRemote(int width, int height);
65 _AppWidgetPopupContext* GetAppWidgetPopup() const;
66 virtual result SendTouchEvent(buffer_event event, double timestamp, double x, double y);
68 // void RestartLifeDurationTimer();
71 result SendAddRequest(int width, int height);
72 result SendUpdateRequest(int width, int height, const Tizen::Base::String& argument);
73 result SendResizeRequest(int width, int height);
74 result SendRemoveRequest();
76 result SendRequestToApp(const Tizen::App::AppId& appId, const Tizen::Base::String& operation, Tizen::Base::Collection::HashMap* pArgs);
77 void SendPendingTouchEvent(void);
79 virtual Tizen::Base::Collection::HashMap* CreateRequestArgs(void);
81 virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
83 struct PendingTouchEvent
86 PendingTouchEvent(int eventType, double timeStamp, double x, double y)
87 : eventType(eventType), timeStamp(timeStamp), x(x), y(y) { }
96 _AppWidgetPopupContext* __pAppWidgetPopup;
97 // Tizen::Base::Runtime::Timer __lifeDurationTimer;
98 Tizen::Base::Runtime::Timer __updateTimer;
100 Tizen::Base::Collection::ArrayListT<PendingTouchEvent*>* __pPendingTouchEventList;
104 } } } // Tizen::Shell::App {
107 #endif // _FSHELL_INTERNAL_APPWIDGET_CONTEXT_H_