diff options
author | Oliver Braun <obr@openoffice.org> | 2001-02-20 10:17:45 +0000 |
---|---|---|
committer | Oliver Braun <obr@openoffice.org> | 2001-02-20 10:17:45 +0000 |
commit | c9327e01b0c7bbb251eca3d1f2025b55c5c7e3f4 (patch) | |
tree | 12f55c44669ab8fbd52dac06c258ed73fa2c5b62 /vcl/source | |
parent | e21c164b2b6e04590633ebeb599ddb3274627fae (diff) |
dnd api change
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/window/dndevdis.cxx | 28 | ||||
-rw-r--r-- | vcl/source/window/dndlcon.cxx | 51 | ||||
-rw-r--r-- | vcl/source/window/dndlcon.hxx | 14 |
3 files changed, 52 insertions, 41 deletions
diff --git a/vcl/source/window/dndevdis.cxx b/vcl/source/window/dndevdis.cxx index c4e5ee7ae0a9..0d29385e41a8 100644 --- a/vcl/source/window/dndevdis.cxx +++ b/vcl/source/window/dndevdis.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dndevdis.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: obr $ $Date: 2001-02-13 13:12:53 $ + * last change: $Author: obr $ $Date: 2001-02-20 11:17:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -100,7 +100,7 @@ void SAL_CALL DNDEventDispatcher::drop( const DropTargetDropEvent& dtde ) { MutexGuard aImplGuard( m_aMutex ); - Point location( dtde.Location.X, dtde.Location.Y ); + Point location( dtde.LocationX, dtde.LocationY ); // find the window that is toplevel for this coordinates OClearableGuard aSolarGuard( Application::GetSolarMutex() ); @@ -142,7 +142,7 @@ void SAL_CALL DNDEventDispatcher::dragEnter( const DropTargetDragEnterEvent& dtd throw(RuntimeException) { MutexGuard aImplGuard( m_aMutex ); - Point location( dtdee.Location.X, dtdee.Location.Y ); + Point location( dtdee.LocationX, dtdee.LocationY ); // find the window that is toplevel for this coordinates OClearableGuard aSolarGuard( Application::GetSolarMutex() ); @@ -190,7 +190,7 @@ void SAL_CALL DNDEventDispatcher::dragOver( const DropTargetDragEvent& dtde ) { MutexGuard aImplGuard( m_aMutex ); - Point location( dtde.Location.X, dtde.Location.Y ); + Point location( dtde.LocationX, dtde.LocationY ); sal_Int32 nListeners; // find the window that is toplevel for this coordinates @@ -234,7 +234,7 @@ void SAL_CALL DNDEventDispatcher::dropActionChanged( const DropTargetDragEvent& { MutexGuard aImplGuard( m_aMutex ); - Point location( dtde.Location.X, dtde.Location.Y ); + Point location( dtde.LocationX, dtde.LocationY ); sal_Int32 nListeners; // find the window that is toplevel for this coordinates @@ -320,8 +320,8 @@ sal_Int32 DNDEventDispatcher::fireDragEnterEvent( Window *pWindow, Point relLoc = pWindow->ImplFrameToOutput( rLocation ); aGuard.clear(); - n = static_cast < DNDListenerContainer * > ( xDropTarget.get() )->fireDragEnterEvent( xContext, nDropAction, - ::com::sun::star::awt::Point( relLoc.X(), relLoc.Y() ), nSourceActions, aFlavorList ); + n = static_cast < DNDListenerContainer * > ( xDropTarget.get() )->fireDragEnterEvent( + xContext, nDropAction, relLoc.X(), relLoc.Y(), nSourceActions, aFlavorList ); } } @@ -353,8 +353,8 @@ sal_Int32 DNDEventDispatcher::fireDragOverEvent( Window *pWindow, Point relLoc = pWindow->ImplFrameToOutput( rLocation ); aGuard.clear(); - n = static_cast < DNDListenerContainer * > ( xDropTarget.get() )->fireDragOverEvent( xContext, nDropAction, - ::com::sun::star::awt::Point( relLoc.X(), relLoc.Y() ), nSourceActions ); + n = static_cast < DNDListenerContainer * > ( xDropTarget.get() )->fireDragOverEvent( + xContext, nDropAction, relLoc.X(), relLoc.Y(), nSourceActions ); } } @@ -410,8 +410,8 @@ sal_Int32 DNDEventDispatcher::fireDropActionChangedEvent( Window *pWindow, Point relLoc = pWindow->ImplFrameToOutput( rLocation ); aGuard.clear(); - n = static_cast < DNDListenerContainer * > ( xDropTarget.get() )->fireDropActionChangedEvent( xContext, nDropAction, - ::com::sun::star::awt::Point( relLoc.X(), relLoc.Y() ), nSourceActions ); + n = static_cast < DNDListenerContainer * > ( xDropTarget.get() )->fireDropActionChangedEvent( + xContext, nDropAction, relLoc.X(), relLoc.Y(), nSourceActions ); } } @@ -443,8 +443,8 @@ sal_Int32 DNDEventDispatcher::fireDropEvent( Window *pWindow, Point relLoc = pWindow->ImplFrameToOutput( rLocation ); aGuard.clear(); - n = static_cast < DNDListenerContainer * > ( xDropTarget.get() )->fireDropEvent( xContext, nDropAction, - ::com::sun::star::awt::Point( relLoc.X(), relLoc.Y() ), nSourceActions, xTransferable ); + n = static_cast < DNDListenerContainer * > ( xDropTarget.get() )->fireDropEvent( + xContext, nDropAction, relLoc.X(), relLoc.Y(), nSourceActions, xTransferable ); } } diff --git a/vcl/source/window/dndlcon.cxx b/vcl/source/window/dndlcon.cxx index 4ab10e68e5df..f62ddd2e5bca 100644 --- a/vcl/source/window/dndlcon.cxx +++ b/vcl/source/window/dndlcon.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dndlcon.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: obr $ $Date: 2001-02-14 16:37:54 $ + * last change: $Author: obr $ $Date: 2001-02-20 11:17:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,7 +62,6 @@ #include<dndlcon.hxx> using namespace ::cppu; -using namespace ::com::sun::star::awt; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::datatransfer; using namespace ::com::sun::star::datatransfer::dnd; @@ -180,7 +179,7 @@ void SAL_CALL DNDListenerContainer::setDefaultActions( sal_Int8 actions ) //================================================================================================== sal_uInt32 DNDListenerContainer::fireDropEvent( const Reference< XDropTargetDropContext >& context, - const sal_Int8 dropAction, const Point& location, const sal_Int8 sourceActions, + sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions, const Reference< XTransferable >& transferable ) { sal_uInt32 nRet = 0; @@ -190,10 +189,12 @@ sal_uInt32 DNDListenerContainer::fireDropEvent( const Reference< XDropTargetDrop if( pContainer && m_bActive ) { - // do not construct the event before you are sure at least one listener is registered - DropTargetDropEvent aEvent( static_cast < XDropTarget * > (this), 0, context, dropAction, location, sourceActions, transferable ); OInterfaceIteratorHelper aIterator( *pContainer ); + // do not construct the event before you are sure at least one listener is registered + DropTargetDropEvent aEvent( static_cast < XDropTarget * > (this), 0, context, dropAction, + locationX, locationY, sourceActions, transferable ); + while (aIterator.hasMoreElements()) { // FIXME: this can be simplified as soon as the Iterator has a remove method @@ -234,9 +235,10 @@ sal_uInt32 DNDListenerContainer::fireDragExitEvent() if( pContainer && m_bActive ) { + OInterfaceIteratorHelper aIterator( *pContainer ); + // do not construct the event before you are sure at least one listener is registered DropTargetEvent aEvent( static_cast < XDropTarget * > (this), 0 ); - OInterfaceIteratorHelper aIterator( *pContainer ); while (aIterator.hasMoreElements()) { @@ -270,7 +272,7 @@ sal_uInt32 DNDListenerContainer::fireDragExitEvent() //================================================================================================== sal_uInt32 DNDListenerContainer::fireDragOverEvent( const Reference< XDropTargetDragContext >& context, - const sal_Int8 dropAction, const Point& location, const sal_Int8 sourceActions ) + sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions ) { sal_uInt32 nRet = 0; @@ -279,10 +281,12 @@ sal_uInt32 DNDListenerContainer::fireDragOverEvent( const Reference< XDropTarget if( pContainer && m_bActive ) { - // do not construct the event before you are sure at least one listener is registered - DropTargetDragEvent aEvent( static_cast < XDropTarget * > (this), 0, context, dropAction, location, sourceActions ); OInterfaceIteratorHelper aIterator( *pContainer ); + // do not construct the event before you are sure at least one listener is registered + DropTargetDragEvent aEvent( static_cast < XDropTarget * > (this), 0, context, dropAction, + locationX, locationY, sourceActions ); + while (aIterator.hasMoreElements()) { // FIXME: this can be simplified as soon as the Iterator has a remove method @@ -315,7 +319,8 @@ sal_uInt32 DNDListenerContainer::fireDragOverEvent( const Reference< XDropTarget //================================================================================================== sal_uInt32 DNDListenerContainer::fireDragEnterEvent( const Reference< XDropTargetDragContext >& context, - const sal_Int8 dropAction, const Point& location, const sal_Int8 sourceActions, const Sequence< DataFlavor >& dataFlavors ) + sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions, + const Sequence< DataFlavor >& dataFlavors ) { sal_uInt32 nRet = 0; @@ -324,10 +329,12 @@ sal_uInt32 DNDListenerContainer::fireDragEnterEvent( const Reference< XDropTarge if( pContainer && m_bActive ) { - // do not construct the event before you are sure at least one listener is registered - DropTargetDragEnterEvent aEvent( static_cast < XDropTarget * > (this), 0, context, dropAction, location, sourceActions, dataFlavors ); OInterfaceIteratorHelper aIterator( *pContainer ); + // do not construct the event before you are sure at least one listener is registered + DropTargetDragEnterEvent aEvent( static_cast < XDropTarget * > (this), 0, context, dropAction, + locationX, locationY, sourceActions, dataFlavors ); + while (aIterator.hasMoreElements()) { // FIXME: this can be simplified as soon as the Iterator has a remove method @@ -360,7 +367,7 @@ sal_uInt32 DNDListenerContainer::fireDragEnterEvent( const Reference< XDropTarge //================================================================================================== sal_uInt32 DNDListenerContainer::fireDropActionChangedEvent( const Reference< XDropTargetDragContext >& context, - const sal_Int8 dropAction, const Point& location, const sal_Int8 sourceActions ) + sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions ) { sal_uInt32 nRet = 0; @@ -369,10 +376,12 @@ sal_uInt32 DNDListenerContainer::fireDropActionChangedEvent( const Reference< XD if( pContainer && m_bActive ) { - // do not construct the event before you are sure at least one listener is registered - DropTargetDragEvent aEvent( static_cast < XDropTarget * > (this), 0, context, dropAction, location, sourceActions ); OInterfaceIteratorHelper aIterator( *pContainer ); + // do not construct the event before you are sure at least one listener is registered + DropTargetDragEvent aEvent( static_cast < XDropTarget * > (this), 0, context, dropAction, + locationX, locationY, sourceActions ); + while (aIterator.hasMoreElements()) { // FIXME: this can be simplified as soon as the Iterator has a remove method @@ -404,8 +413,8 @@ sal_uInt32 DNDListenerContainer::fireDropActionChangedEvent( const Reference< XD // DNDListenerContainer::fireDragGestureEvent //================================================================================================== -sal_uInt32 DNDListenerContainer::fireDragGestureEvent( const sal_Int8 dragAction, const Point& dragOrigin, - const Reference< XDragSource >& dragSource, const Any& triggerEvent ) +sal_uInt32 DNDListenerContainer::fireDragGestureEvent( const sal_Int8 dragAction, sal_Int32 dragOriginX, + sal_Int32 dragOriginY, const Reference< XDragSource >& dragSource, const Any& triggerEvent ) { sal_uInt32 nRet = 0; @@ -414,10 +423,12 @@ sal_uInt32 DNDListenerContainer::fireDragGestureEvent( const sal_Int8 dragAction if( pContainer ) { - // do not construct the event before you are sure at least one listener is registered - DragGestureEvent aEvent( static_cast < XDragGestureRecognizer * > (this), dragAction, dragOrigin, dragSource, triggerEvent ); OInterfaceIteratorHelper aIterator( *pContainer ); + // do not construct the event before you are sure at least one listener is registered + DragGestureEvent aEvent( static_cast < XDragGestureRecognizer * > (this), dragAction, + dragOriginX, dragOriginY, dragSource, triggerEvent ); + while( aIterator.hasMoreElements() ) { // FIXME: this can be simplified as soon as the Iterator has a remove method diff --git a/vcl/source/window/dndlcon.hxx b/vcl/source/window/dndlcon.hxx index 2c1e3409713b..ae6bec5714f5 100644 --- a/vcl/source/window/dndlcon.hxx +++ b/vcl/source/window/dndlcon.hxx @@ -2,9 +2,9 @@ * * $RCSfile: dndlcon.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: obr $ $Date: 2001-02-09 15:59:18 $ + * last change: $Author: obr $ $Date: 2001-02-20 11:17:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -94,26 +94,26 @@ public: sal_uInt32 fireDropEvent( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDropContext >& context, - const sal_Int8 dropAction, const ::com::sun::star::awt::Point& location, const sal_Int8 sourceActions, + sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& transferable ); sal_uInt32 fireDragExitEvent(); sal_uInt32 fireDragOverEvent( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& context, - const sal_Int8 dropAction, const ::com::sun::star::awt::Point& location, const sal_Int8 sourceActions ); + sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions ); sal_uInt32 fireDragEnterEvent( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& context, - const sal_Int8 dropAction, const ::com::sun::star::awt::Point& location, const sal_Int8 sourceActions, + sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions, const ::com::sun::star::uno::Sequence< ::com::sun::star::datatransfer::DataFlavor >& dataFlavor ); sal_uInt32 fireDropActionChangedEvent( const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext >& context, - const sal_Int8 dropAction, const ::com::sun::star::awt::Point& location, const sal_Int8 sourceActions ); + sal_Int8 dropAction, sal_Int32 locationX, sal_Int32 locationY, sal_Int8 sourceActions ); sal_uInt32 fireDragGestureEvent( - const sal_Int8 dragAction, const ::com::sun::star::awt::Point& dragOrigin, + sal_Int8 dragAction, sal_Int32 dragOriginX, sal_Int32 dragOriginY, const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource >& dragSource, const ::com::sun::star::uno::Any& triggerEvent ); |