merge the formfield patch from ooo-build
[ooovba.git] / dtrans / test / win32 / dnd / targetlistener.hxx
blob4683dc713d38e74e2ff0bf09eb37b95aab92f629
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: targetlistener.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _TARGETLISTENER_HXX_
32 #define _TARGETLISTENER_HXX_
34 #if defined _MSC_VER
35 #pragma warning(push,1)
36 #endif
37 #include <windows.h>
38 #if defined _MSC_VER
39 #pragma warning(pop)
40 #endif
41 #include <cppuhelper/implbase1.hxx>
42 #include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp>
43 #include <com/sun/star/datatransfer/dnd/DropTargetDropEvent.hpp>
44 #include <com/sun/star/datatransfer/dnd/DropTargetDragEvent.hpp>
45 #include <com/sun/star/datatransfer/dnd/DropTargetDragEnterEvent.hpp>
47 using namespace ::com::sun::star::datatransfer;
48 using namespace ::com::sun::star::datatransfer::dnd;
49 using namespace ::cppu;
50 using namespace ::com::sun::star::uno;
51 using namespace ::com::sun::star::lang;
53 class DropTargetListener: public WeakImplHelper1<XDropTargetListener>
55 // this is a window where droped data are shown as text (only text)
56 HWND m_hEdit;
57 public:
58 DropTargetListener( HWND hEdit);
59 ~DropTargetListener();
61 virtual void SAL_CALL disposing( const EventObject& Source )
62 throw(RuntimeException);
65 virtual void SAL_CALL drop( const DropTargetDropEvent& dtde )
66 throw(RuntimeException);
67 virtual void SAL_CALL dragEnter( const DropTargetDragEnterEvent& dtde )
68 throw(RuntimeException);
69 virtual void SAL_CALL dragExit( const DropTargetEvent& dte )
70 throw(RuntimeException);
71 virtual void SAL_CALL dragOver( const DropTargetDragEvent& dtde )
72 throw(RuntimeException);
73 virtual void SAL_CALL dropActionChanged( const DropTargetDragEvent& dtde )
74 throw(RuntimeException);
77 #endif