1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20 #include "X11_dndcontext.hxx"
21 #include "X11_selection.hxx"
22
23 using namespace cppu;
24 using namespace x11;
25
26 /*
27 * DropTargetDropContext
28 */
29
DropTargetDropContext(::Window aDropWindow,SelectionManager & rManager)30 DropTargetDropContext::DropTargetDropContext(
31 ::Window aDropWindow,
32 SelectionManager& rManager ) :
33 m_aDropWindow( aDropWindow ),
34 m_xManager( &rManager )
35 {
36 }
37
~DropTargetDropContext()38 DropTargetDropContext::~DropTargetDropContext()
39 {
40 }
41
acceptDrop(sal_Int8 dragOperation)42 void DropTargetDropContext::acceptDrop( sal_Int8 dragOperation )
43 {
44 m_xManager->accept( dragOperation, m_aDropWindow );
45 }
46
rejectDrop()47 void DropTargetDropContext::rejectDrop()
48 {
49 m_xManager->reject( m_aDropWindow );
50 }
51
dropComplete(sal_Bool success)52 void DropTargetDropContext::dropComplete( sal_Bool success )
53 {
54 m_xManager->dropComplete( success, m_aDropWindow );
55 }
56
57 /*
58 * DropTargetDragContext
59 */
60
DropTargetDragContext(::Window aDropWindow,SelectionManager & rManager)61 DropTargetDragContext::DropTargetDragContext(
62 ::Window aDropWindow,
63 SelectionManager& rManager ) :
64 m_aDropWindow( aDropWindow ),
65 m_xManager( &rManager )
66 {
67 }
68
~DropTargetDragContext()69 DropTargetDragContext::~DropTargetDragContext()
70 {
71 }
72
acceptDrag(sal_Int8 dragOperation)73 void DropTargetDragContext::acceptDrag( sal_Int8 dragOperation )
74 {
75 m_xManager->accept( dragOperation, m_aDropWindow );
76 }
77
rejectDrag()78 void DropTargetDragContext::rejectDrag()
79 {
80 m_xManager->reject( m_aDropWindow );
81 }
82
83 /*
84 * DragSourceContext
85 */
86
DragSourceContext(::Window aDropWindow,SelectionManager & rManager)87 DragSourceContext::DragSourceContext(
88 ::Window aDropWindow,
89 SelectionManager& rManager ) :
90 m_aDropWindow( aDropWindow ),
91 m_xManager( &rManager )
92 {
93 }
94
~DragSourceContext()95 DragSourceContext::~DragSourceContext()
96 {
97 }
98
getCurrentCursor()99 sal_Int32 DragSourceContext::getCurrentCursor()
100 {
101 return m_xManager->getCurrentCursor();
102 }
103
setCursor(sal_Int32 cursorId)104 void DragSourceContext::setCursor( sal_Int32 cursorId )
105 {
106 m_xManager->setCursor( cursorId, m_aDropWindow );
107 }
108
setImage(sal_Int32)109 void DragSourceContext::setImage( sal_Int32 )
110 {
111 }
112
transferablesFlavorsChanged()113 void DragSourceContext::transferablesFlavorsChanged()
114 {
115 m_xManager->transferablesFlavorsChanged();
116 }
117
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
119