2 * Copyright (c) 2014 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (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://www.apache.org/licenses/LICENSE-2.0
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.
19 #include "drag-and-drop-detector-impl.h"
30 Dali::DragAndDropDetector DragAndDropDetector::New()
32 Dali::DragAndDropDetector detector = Dali::DragAndDropDetector(new DragAndDropDetector());
37 const std::string& DragAndDropDetector::GetContent() const
42 Vector2 DragAndDropDetector::GetCurrentScreenPosition() const
44 return mScreenPosition;
47 bool DragAndDropDetector::IsEnabled() const
49 return !mDroppedSignal.Empty() || !mEnteredSignal.Empty() || !mExitedSignal.Empty() || !mMovedSignal.Empty() ;
52 void DragAndDropDetector::SetContent( const std::string& content )
57 void DragAndDropDetector::ClearContent()
62 void DragAndDropDetector::SetPosition( Vector2 screenPosition )
64 mScreenPosition = screenPosition;
67 void DragAndDropDetector::EmitEnteredSignal()
69 if ( !mEnteredSignal.Empty() )
71 Dali::DragAndDropDetector handle( this );
72 mEnteredSignal.Emit( handle );
76 void DragAndDropDetector::EmitExitedSignal()
78 if ( !mExitedSignal.Empty() )
80 Dali::DragAndDropDetector handle( this );
81 mExitedSignal.Emit( handle );
85 void DragAndDropDetector::EmitMovedSignal()
87 if ( !mMovedSignal.Empty() )
89 Dali::DragAndDropDetector handle( this );
90 mMovedSignal.Emit( handle );
94 void DragAndDropDetector::EmitDroppedSignal()
96 if ( !mDroppedSignal.Empty() )
98 Dali::DragAndDropDetector handle( this );
99 mDroppedSignal.Emit( handle );
103 DragAndDropDetector::DragAndDropDetector()
109 DragAndDropDetector::~DragAndDropDetector()
113 } // namespace Adaptor
115 } // namespace Internal