From 545c52940732ba4ea68d26ee78d386a5f257158c Mon Sep 17 00:00:00 2001 From: "jungmin76.park" Date: Tue, 12 Feb 2013 22:59:45 +0900 Subject: [PATCH] add x, y param for LiveboxPopup Change-Id: I41b0fcbc7b85a636ec236470a5cc4f23c0358c62 Signed-off-by: jungmin76.park --- inc/FShell_LiveboxContext.h | 2 +- inc/FShell_LiveboxContextBase.h | 2 +- inc/FShell_LiveboxPopupContext.h | 4 ++-- src/FShell_LiveboxContext.cpp | 4 ++-- src/FShell_LiveboxManagerService.cpp | 2 +- src/FShell_LiveboxPopupContext.cpp | 10 +++++++--- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/inc/FShell_LiveboxContext.h b/inc/FShell_LiveboxContext.h index bd9f32a..6437848 100644 --- a/inc/FShell_LiveboxContext.h +++ b/inc/FShell_LiveboxContext.h @@ -57,7 +57,7 @@ public: void OnRemoved(); void OnForeground(); void OnBackground(); - virtual void OnPopupCreated(int width, int height); + virtual void OnPopupCreated(int x, int y, int width, int height); virtual void OnPopupDestoyed(void); result RequestUpdateRemote(int width, int height); diff --git a/inc/FShell_LiveboxContextBase.h b/inc/FShell_LiveboxContextBase.h index 2968b58..5265b77 100644 --- a/inc/FShell_LiveboxContextBase.h +++ b/inc/FShell_LiveboxContextBase.h @@ -45,7 +45,7 @@ public: _LiveboxContextBase(target_type type, const Tizen::Base::String& userInfo, const Tizen::Base::String& providerId, const Tizen::Base::String& instanceId, int width, int height, int priority); virtual ~_LiveboxContextBase(); - virtual void OnPopupCreated(int width, int height) = 0; + virtual void OnPopupCreated(int x, int y, int width, int height) = 0; virtual void OnPopupDestoyed(void) = 0; virtual result SendTouchEvent(buffer_event event, double timestamp, double x, double y) = 0; diff --git a/inc/FShell_LiveboxPopupContext.h b/inc/FShell_LiveboxPopupContext.h index 8b72e61..24efaf4 100644 --- a/inc/FShell_LiveboxPopupContext.h +++ b/inc/FShell_LiveboxPopupContext.h @@ -38,11 +38,11 @@ public: virtual ~_LiveboxPopupContext(); // event handler - void OnPopupCreated(int width, int height); + void OnPopupCreated(int x, int y, int width, int height); void OnPopupDestoyed(void); // request to app - result SendPopupCreateRequest(int width, int height); + result SendPopupCreateRequest(int x, int y, int width, int height); result SendPopupDestroyRequest(); virtual result SendTouchEvent(buffer_event event, double timestamp, double x, double y); diff --git a/src/FShell_LiveboxContext.cpp b/src/FShell_LiveboxContext.cpp index 00c37d1..f6fc332 100644 --- a/src/FShell_LiveboxContext.cpp +++ b/src/FShell_LiveboxContext.cpp @@ -141,11 +141,11 @@ _LiveboxContext::OnBackground() } void -_LiveboxContext::OnPopupCreated(int width, int height) +_LiveboxContext::OnPopupCreated(int x, int y, int width, int height) { __pLiveboxPopup = new (std::nothrow) _LiveboxPopupContext(__userInfo, __providerId, __instanceId, width, height, __priority); __pLiveboxPopup->SetClientId(__ipcClientId); - __pLiveboxPopup->OnPopupCreated(width, height); + __pLiveboxPopup->OnPopupCreated(x, y, width, height); __lifeDurationTimer.Cancel(); } diff --git a/src/FShell_LiveboxManagerService.cpp b/src/FShell_LiveboxManagerService.cpp index 7ebb33b..8210080 100644 --- a/src/FShell_LiveboxManagerService.cpp +++ b/src/FShell_LiveboxManagerService.cpp @@ -329,7 +329,7 @@ LiveboxManagerService::OnLiveboxPopupCreate(struct event_arg *arg, void* data) { pLiveboxContext->OnPopupDestoyed(); }*/ - pLiveboxContext->OnPopupCreated(arg->info.pd_create.w, arg->info.pd_create.h); + pLiveboxContext->OnPopupCreated(arg->info.pd_create.x, arg->info.pd_create.y, arg->info.pd_create.w, arg->info.pd_create.h); return 0; } diff --git a/src/FShell_LiveboxPopupContext.cpp b/src/FShell_LiveboxPopupContext.cpp index ad16a00..a0dd789 100644 --- a/src/FShell_LiveboxPopupContext.cpp +++ b/src/FShell_LiveboxPopupContext.cpp @@ -45,6 +45,8 @@ const String LIVEBOX_TRAY_ON_CREATE(L"LiveboxTray='event=create'"); const String LIVEBOX_TRAY_ON_DESTROY(L"LiveboxTray='event=destroy'"); const String LIVEBOX_TRAY_ON_TOUCH(L"LiveboxTray='event=touch'"); +const String ARG_KEY_X = L"_X"; +const String ARG_KEY_Y = L"_Y"; const String ARG_KEY_WIDTH = L"_Width"; const String ARG_KEY_HEIGHT = L"_Height"; @@ -63,10 +65,10 @@ _LiveboxPopupContext::~_LiveboxPopupContext() void -_LiveboxPopupContext::OnPopupCreated(int width, int height) +_LiveboxPopupContext::OnPopupCreated(int x, int y, int width, int height) { SysLog(NID_APP, "width(%d), height(%d)", width, height); - SendPopupCreateRequest(width, height); + SendPopupCreateRequest(x, y, width, height); } void @@ -77,10 +79,12 @@ _LiveboxPopupContext::OnPopupDestoyed() } result -_LiveboxPopupContext::SendPopupCreateRequest(int width, int height) +_LiveboxPopupContext::SendPopupCreateRequest(int x, int y, int width, int height) { std::unique_ptr pArgs (CreateRequestArgs() ); + pArgs->Add(new String(ARG_KEY_X), new String(Integer::ToString(x))); + pArgs->Add(new String(ARG_KEY_Y), new String(Integer::ToString(y))); pArgs->Add(new String(ARG_KEY_WIDTH), new String(Integer::ToString(width))); pArgs->Add(new String(ARG_KEY_HEIGHT), new String(Integer::ToString(height))); -- 2.7.4