Changed indicator bg color.
[platform/framework/native/uifw.git] / src / ui / FUi_DragDropEventArg.cpp
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0/
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  * @file                FUi_DragDropEventArg.cpp
19  * @brief               This is the implementation file for _DragDropEventArg class
20  * @version             2.0
21  *
22  * This file contains the implementation of %_DragDropEventArg class.
23  *
24  */
25
26 #include "FUi_DragDropEventArg.h"
27
28 using namespace Tizen::Base;
29 using namespace Tizen::Base::Runtime;
30
31 namespace Tizen { namespace Ui
32 {
33 _DragDropEventArg::_DragDropEventArg(const Control& source, DragDropStatus status)
34         : __pSource(const_cast <Control*>(&source))
35         , __pDraggedControl(null)
36         , __dragDropStatus(status)
37         , __startPosition(-1, -1)
38         , __currentPosition(-1, -1)
39 {
40         // NOTHING
41 }
42
43 _DragDropEventArg::~_DragDropEventArg(void)
44 {
45         // NOTHING
46 }
47
48 DragDropStatus
49 _DragDropEventArg::GetDragDropStatus(void) const
50 {
51         return (__dragDropStatus);
52 }
53
54
55 const Tizen::Ui::Control*
56 _DragDropEventArg::GetSource(void) const
57 {
58         return (__pSource);
59 }
60
61
62 const Tizen::Graphics::FloatPoint
63 _DragDropEventArg::GetStartPosition(void) const
64 {
65         return __startPosition;
66 }
67
68 const Tizen::Graphics::FloatPoint
69 _DragDropEventArg::GetCurrentPosition(void) const
70 {
71         return __currentPosition;
72 }
73
74 result
75 _DragDropEventArg::SetDraggedControl(const Tizen::Ui::Control* pDraggedControl)
76 {
77         __pDraggedControl = (Tizen::Ui::Control*) pDraggedControl;
78 //      if( pDragedControl == null) return E_FAILURE;
79         return E_SUCCESS;
80 }
81
82 const Tizen::Ui::Control*
83 _DragDropEventArg::GetDraggedControl(void) const
84 {
85         return (const Tizen::Ui::Control*) __pDraggedControl;
86 }
87
88 result
89 _DragDropEventArg::SetTouchPosition(float startX, float startY, float currentX, float currentY)
90 {
91         __startPosition = Tizen::Graphics::FloatPoint(startX, startY);
92         __currentPosition = Tizen::Graphics::FloatPoint(currentX, currentY);
93
94         return E_SUCCESS;
95 }
96
97 };
98 };    // Tizen::Ui