LCOV - code coverage report
Current view: top level - vcl/unx/generic/dtrans - X11_selection.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 18 0.0 %
Date: 2014-11-03 Functions: 0 14 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : #ifndef INCLUDED_VCL_UNX_GENERIC_DTRANS_X11_SELECTION_HXX
      21             : #define INCLUDED_VCL_UNX_GENERIC_DTRANS_X11_SELECTION_HXX
      22             : 
      23             : #include <cppuhelper/compbase3.hxx>
      24             : #include <cppuhelper/compbase4.hxx>
      25             : #include <com/sun/star/datatransfer/XTransferable.hpp>
      26             : #include <com/sun/star/datatransfer/dnd/XDropTarget.hpp>
      27             : #include <com/sun/star/datatransfer/dnd/XDragSource.hpp>
      28             : #include <com/sun/star/awt/XDisplayConnection.hpp>
      29             : #include <com/sun/star/lang/XInitialization.hpp>
      30             : #include <com/sun/star/lang/XServiceInfo.hpp>
      31             : #include <com/sun/star/frame/XDesktop2.hpp>
      32             : #include <osl/thread.h>
      33             : 
      34             : #include <osl/conditn.hxx>
      35             : 
      36             : #include <boost/unordered_map.hpp>
      37             : #include <list>
      38             : 
      39             : #include <prex.h>
      40             : #include <X11/Xlib.h>
      41             : #include <postx.h>
      42             : 
      43             : #define XDND_IMPLEMENTATION_NAME "com.sun.star.datatransfer.dnd.XdndSupport"
      44             : #define XDND_DROPTARGET_IMPLEMENTATION_NAME "com.sun.star.datatransfer.dnd.XdndDropTarget"
      45             : 
      46             : namespace x11 {
      47             : 
      48             :     class PixmapHolder; // in bmp.hxx
      49             : 
      50             :     rtl_TextEncoding getTextPlainEncoding( const OUString& rMimeType );
      51             : 
      52           0 :     class SelectionAdaptor
      53             :     {
      54             :     public:
      55             :         virtual css::uno::Reference< css::datatransfer::XTransferable > getTransferable() = 0;
      56             :         virtual void clearTransferable() = 0;
      57             :         virtual void fireContentsChanged() = 0;
      58             :         virtual css::uno::Reference< css::uno::XInterface > getReference() = 0;
      59             :         // returns a reference that will keep the SelectionAdaptor alive until the
      60             :         // refernce is released
      61             : 
      62             :     protected:
      63           0 :         ~SelectionAdaptor() {}
      64             :     };
      65             : 
      66             :     class DropTarget :
      67             :         public ::cppu::WeakComponentImplHelper3<
      68             :             css::datatransfer::dnd::XDropTarget,
      69             :             css::lang::XInitialization,
      70             :             css::lang::XServiceInfo
      71             :         >
      72             :     {
      73             :     public:
      74             :         ::osl::Mutex                m_aMutex;
      75             :         bool                        m_bActive;
      76             :         sal_Int8                    m_nDefaultActions;
      77             :         ::Window                    m_aTargetWindow;
      78             :         class SelectionManager*     m_pSelectionManager;
      79             :         css::uno::Reference< css::datatransfer::dnd::XDragSource >
      80             :                                     m_xSelectionManager;
      81             :         ::std::list< css::uno::Reference< css::datatransfer::dnd::XDropTargetListener > >
      82             :                             m_aListeners;
      83             : 
      84             :         DropTarget();
      85             :         virtual ~DropTarget();
      86             : 
      87             :         // convenience functions that loop over listeners
      88             :         void dragEnter( const css::datatransfer::dnd::DropTargetDragEnterEvent& dtde ) throw();
      89             :         void dragExit( const css::datatransfer::dnd::DropTargetEvent& dte ) throw();
      90             :         void dragOver( const css::datatransfer::dnd::DropTargetDragEvent& dtde ) throw();
      91             :         void drop( const css::datatransfer::dnd::DropTargetDropEvent& dtde ) throw();
      92             : 
      93             :         // XInitialization
      94             :         virtual void        SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& args ) throw ( css::uno::Exception, std::exception ) SAL_OVERRIDE;
      95             : 
      96             :         // XDropTarget
      97             :         virtual void        SAL_CALL addDropTargetListener( const css::uno::Reference< css::datatransfer::dnd::XDropTargetListener >& ) throw(std::exception) SAL_OVERRIDE;
      98             :         virtual void        SAL_CALL removeDropTargetListener( const css::uno::Reference< css::datatransfer::dnd::XDropTargetListener >& ) throw(std::exception) SAL_OVERRIDE;
      99             :         virtual sal_Bool    SAL_CALL isActive() throw(std::exception) SAL_OVERRIDE;
     100             :         virtual void        SAL_CALL setActive( sal_Bool active ) throw(std::exception) SAL_OVERRIDE;
     101             :         virtual sal_Int8    SAL_CALL getDefaultActions() throw(std::exception) SAL_OVERRIDE;
     102             :         virtual void        SAL_CALL setDefaultActions( sal_Int8 actions ) throw(std::exception) SAL_OVERRIDE;
     103             : 
     104             :         // XServiceInfo
     105             :         virtual OUString SAL_CALL getImplementationName() throw(std::exception) SAL_OVERRIDE;
     106             :         virtual sal_Bool    SAL_CALL supportsService( const OUString& ServiceName ) throw(std::exception) SAL_OVERRIDE;
     107             :         virtual css::uno::Sequence< OUString >
     108             :                             SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE;
     109             :     };
     110             : 
     111             :     class SelectionManagerHolder :
     112             :         public ::cppu::WeakComponentImplHelper3<
     113             :             css::datatransfer::dnd::XDragSource,
     114             :             css::lang::XInitialization,
     115             :             css::lang::XServiceInfo
     116             :         >
     117             :     {
     118             :         ::osl::Mutex m_aMutex;
     119             :         css::uno::Reference< css::datatransfer::dnd::XDragSource >
     120             :             m_xRealDragSource;
     121             :     public:
     122             :         SelectionManagerHolder();
     123             :         virtual ~SelectionManagerHolder();
     124             : 
     125             :         // XServiceInfo
     126             :         virtual OUString SAL_CALL getImplementationName() throw(std::exception) SAL_OVERRIDE;
     127             :         virtual sal_Bool    SAL_CALL supportsService( const OUString& ServiceName ) throw(std::exception) SAL_OVERRIDE;
     128             :         virtual css::uno::Sequence< OUString >
     129             :                             SAL_CALL getSupportedServiceNames() throw(std::exception) SAL_OVERRIDE;
     130             : 
     131             :         // XInitialization
     132             :         virtual void        SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& arguments ) throw( css::uno::Exception, std::exception ) SAL_OVERRIDE;
     133             : 
     134             :         // XDragSource
     135             :         virtual sal_Bool    SAL_CALL isDragImageSupported() throw(std::exception) SAL_OVERRIDE;
     136             :         virtual sal_Int32   SAL_CALL getDefaultCursor( sal_Int8 dragAction ) throw(std::exception) SAL_OVERRIDE;
     137             :         virtual void        SAL_CALL startDrag(
     138             :             const css::datatransfer::dnd::DragGestureEvent& trigger,
     139             :             sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image,
     140             :             const css::uno::Reference< css::datatransfer::XTransferable >& transferable,
     141             :             const css::uno::Reference< css::datatransfer::dnd::XDragSourceListener >& listener
     142             :             ) throw(std::exception) SAL_OVERRIDE;
     143             : 
     144             :     };
     145             : 
     146             :     class SelectionManager :
     147             :         public ::cppu::WeakImplHelper4<
     148             :             css::datatransfer::dnd::XDragSource,
     149             :             css::lang::XInitialization,
     150             :             css::awt::XEventHandler,
     151             :             css::frame::XTerminateListener
     152             :         >,
     153             :         public SelectionAdaptor
     154             :     {
     155             :         static ::boost::unordered_map< OUString, SelectionManager*, OUStringHash >& getInstances();
     156             : 
     157             :         // for INCR type selection transfer
     158             :         // INCR protocol is used if the data cannot
     159             :         // be transported at once but in parts
     160             :         // IncrementalTransfer holds the bytes to be transmitted
     161             :         // as well a the current position
     162             :         // INCR triggers the delivery of the next part by deleting the
     163             :         // property used to transfer the data
     164           0 :         struct IncrementalTransfer
     165             :         {
     166             :             css::uno::Sequence< sal_Int8 >  m_aData;
     167             :             int                             m_nBufferPos;
     168             :             ::Window                        m_aRequestor;
     169             :             Atom                            m_aProperty;
     170             :             Atom                            m_aTarget;
     171             :             int                             m_nFormat;
     172             :             int                             m_nTransferStartTime;
     173             :         };
     174             :         int m_nIncrementalThreshold;
     175             : 
     176             :         // a struct to hold the data associated with a selection
     177           0 :         struct Selection
     178             :         {
     179             :             enum State
     180             :             {
     181             :                 Inactive, WaitingForResponse, WaitingForData, IncrementalTransfer
     182             :             };
     183             : 
     184             :             State                       m_eState;
     185             :             SelectionAdaptor*           m_pAdaptor;
     186             :             Atom                        m_aAtom;
     187             :             ::osl::Condition            m_aDataArrived;
     188             :             css::uno::Sequence< sal_Int8 > m_aData;
     189             :             css::uno::Sequence< css::datatransfer::DataFlavor >
     190             :                                         m_aTypes;
     191             :             std::vector< Atom >         m_aNativeTypes;
     192             :             // this is used for caching
     193             :             // m_aTypes is invalid after 2 seconds
     194             :             // m_aNativeTypes contains the corresponding original atom
     195             :             Atom                        m_aRequestedType;
     196             :             // m_aRequestedType is only valid while WaitingForResponse and WaitingFotData
     197             :             int                         m_nLastTimestamp;
     198             :             bool                        m_bHaveUTF16;
     199             :             Atom                        m_aUTF8Type;
     200             :             bool                        m_bHaveCompound;
     201             :             bool                        m_bOwner;
     202             :             ::Window                    m_aLastOwner;
     203             :             PixmapHolder*               m_pPixmap;
     204             :             // m_nOrigTimestamp contains the Timestamp at which the seclection
     205             :             // was acquired; needed for TimeSTAMP target
     206             :             Time                        m_nOrigTimestamp;
     207             : 
     208           0 :             Selection() : m_eState( Inactive ),
     209             :                           m_pAdaptor( NULL ),
     210             :                           m_aAtom( None ),
     211             :                           m_aRequestedType( None ),
     212             :                           m_nLastTimestamp( 0 ),
     213             :                           m_bHaveUTF16( false ),
     214             :                           m_aUTF8Type( None ),
     215             :                           m_bHaveCompound( false ),
     216             :                           m_bOwner( false ),
     217             :                           m_aLastOwner( None ),
     218             :                           m_pPixmap( NULL ),
     219           0 :                           m_nOrigTimestamp( CurrentTime )
     220           0 :                 {}
     221             :         };
     222             : 
     223             :         // a struct to hold data associated with a XDropTarget
     224             :         struct DropTargetEntry
     225             :         {
     226             :             DropTarget*     m_pTarget;
     227             :             ::Window        m_aRootWindow;
     228             : 
     229           0 :             DropTargetEntry() : m_pTarget( NULL ), m_aRootWindow( None ) {}
     230           0 :             DropTargetEntry( DropTarget* pTarget ) :
     231             :                     m_pTarget( pTarget ),
     232           0 :                     m_aRootWindow( None )
     233           0 :                 {}
     234             :             DropTargetEntry( const DropTargetEntry& rEntry ) :
     235             :                     m_pTarget( rEntry.m_pTarget ),
     236             :                     m_aRootWindow( rEntry.m_aRootWindow )
     237             :                 {}
     238           0 :             ~DropTargetEntry() {}
     239             : 
     240           0 :             DropTarget* operator->() const { return m_pTarget; }
     241           0 :             DropTargetEntry& operator=(const DropTargetEntry& rEntry)
     242           0 :                 { m_pTarget = rEntry.m_pTarget; m_aRootWindow = rEntry.m_aRootWindow; return *this; }
     243             :         };
     244             : 
     245             :         // internal data
     246             :         Display*                    m_pDisplay;
     247             :         oslThread                   m_aThread;
     248             :         int                         m_EndThreadPipe[2];
     249             :         oslThread                   m_aDragExecuteThread;
     250             :         ::osl::Condition            m_aDragRunning;
     251             :         ::Window                    m_aWindow;
     252             :         css::uno::Reference< css::frame::XDesktop2 > m_xDesktop;
     253             :         css::uno::Reference< css::awt::XDisplayConnection >
     254             :                                     m_xDisplayConnection;
     255             :         sal_Int32                   m_nSelectionTimeout;
     256             :         Time                        m_nSelectionTimestamp;
     257             : 
     258             :         // members used for Xdnd
     259             : 
     260             :         // drop only
     261             : 
     262             :         // contains the XdndEnterEvent of a drop action running
     263             :         // with one of our targets. The data.l[0] member
     264             :         // (conatining the drag source ::Window) is set
     265             :         // to None while that is not the case
     266             :         XClientMessageEvent         m_aDropEnterEvent;
     267             :         // set to false on XdndEnter
     268             :         // set to true on first XdndPosition or XdndLeave
     269             :         bool                        m_bDropEnterSent;
     270             :         ::Window                    m_aCurrentDropWindow;
     271             :         // Time code of XdndDrop
     272             :         Time                        m_nDropTime;
     273             :         sal_Int8                    m_nLastDropAction;
     274             :         // XTransferable for Xdnd with foreign drag source
     275             :         css::uno::Reference< css::datatransfer::XTransferable >
     276             :                                     m_xDropTransferable;
     277             :         int                         m_nLastX, m_nLastY;
     278             :         Time                        m_nDropTimestamp;
     279             :         // set to true when calling drop()
     280             :         // if another XdndEnter is received this shows that
     281             :         // someone forgot to call dropComplete - we should reset
     282             :         // and react to the new drop
     283             :         bool                        m_bDropWaitingForCompletion;
     284             : 
     285             :         // drag only
     286             : 
     287             :         // None if no Dnd action is running with us as source
     288             :         ::Window                    m_aDropWindow;
     289             :         // either m_aDropWindow or its XdndProxy
     290             :         ::Window                    m_aDropProxy;
     291             :         ::Window                    m_aDragSourceWindow;
     292             :         // XTransferable for Xdnd when we are drag source
     293             :         css::uno::Reference< css::datatransfer::XTransferable >
     294             :                                     m_xDragSourceTransferable;
     295             :         css::uno::Reference< css::datatransfer::dnd::XDragSourceListener >
     296             :                                     m_xDragSourceListener;
     297             :         // root coordinates
     298             :         int                         m_nLastDragX, m_nLastDragY;
     299             :         css::uno::Sequence< css::datatransfer::DataFlavor >
     300             :                                     m_aDragFlavors;
     301             :         // the rectangle the pointer must leave until a new XdndPosition should
     302             :         // be sent. empty unless the drop target told to fill
     303             :         int                         m_nNoPosX, m_nNoPosY, m_nNoPosWidth, m_nNoPosHeight;
     304             :         unsigned int                m_nDragButton;
     305             :         sal_Int8                    m_nUserDragAction;
     306             :         sal_Int8                    m_nTargetAcceptAction;
     307             :         sal_Int8                    m_nSourceActions;
     308             :         bool                        m_bLastDropAccepted;
     309             :         bool                        m_bDropSuccess;
     310             :         bool                        m_bDropSent;
     311             :         time_t                      m_nDropTimeout;
     312             :         bool                        m_bWaitingForPrimaryConversion;
     313             :         Time                        m_nDragTimestamp;
     314             : 
     315             :         // drag cursors
     316             :         Cursor                      m_aMoveCursor;
     317             :         Cursor                      m_aCopyCursor;
     318             :         Cursor                      m_aLinkCursor;
     319             :         Cursor                      m_aNoneCursor;
     320             :         Cursor                      m_aCurrentCursor;
     321             : 
     322             :         // drag and drop
     323             : 
     324             :         int                         m_nCurrentProtocolVersion;
     325             :         ::boost::unordered_map< ::Window, DropTargetEntry >
     326             :                                     m_aDropTargets;
     327             : 
     328             :         // some special atoms that are needed often
     329             :         Atom                        m_nCLIPBOARDAtom;
     330             :         Atom                        m_nTARGETSAtom;
     331             :         Atom                        m_nTIMESTAMPAtom;
     332             :         Atom                        m_nTEXTAtom;
     333             :         Atom                        m_nINCRAtom;
     334             :         Atom                        m_nCOMPOUNDAtom;
     335             :         Atom                        m_nMULTIPLEAtom;
     336             :         Atom                        m_nUTF16Atom;
     337             :         Atom                        m_nImageBmpAtom;
     338             :         Atom                        m_nXdndAware;
     339             :         Atom                        m_nXdndEnter;
     340             :         Atom                        m_nXdndLeave;
     341             :         Atom                        m_nXdndPosition;
     342             :         Atom                        m_nXdndStatus;
     343             :         Atom                        m_nXdndDrop;
     344             :         Atom                        m_nXdndFinished;
     345             :         Atom                        m_nXdndSelection;
     346             :         Atom                        m_nXdndTypeList;
     347             :         Atom                        m_nXdndProxy;
     348             :         Atom                        m_nXdndActionCopy;
     349             :         Atom                        m_nXdndActionMove;
     350             :         Atom                        m_nXdndActionLink;
     351             :         Atom                        m_nXdndActionAsk;
     352             :         Atom                        m_nXdndActionPrivate;
     353             : 
     354             :         // caching for atoms
     355             :         ::boost::unordered_map< Atom, OUString >
     356             :                                     m_aAtomToString;
     357             :         ::boost::unordered_map< OUString, Atom, OUStringHash >
     358             :                                     m_aStringToAtom;
     359             : 
     360             :         // the registered selections
     361             :         ::boost::unordered_map< Atom, Selection* >
     362             :                                     m_aSelections;
     363             :         // IncrementalTransfers in progress
     364             :         boost::unordered_map< ::Window, boost::unordered_map< Atom, IncrementalTransfer > >
     365             :                                     m_aIncrementals;
     366             : 
     367             :         // do not use X11 multithreading capabilities
     368             :         // since this leads to deadlocks in different Xlib implentations
     369             :         // (XFree as well as Xsun) use an own mutex instead
     370             :         ::osl::Mutex                m_aMutex;
     371             :         bool                        m_bShutDown;
     372             : 
     373             :         SelectionManager();
     374             :         virtual ~SelectionManager();
     375             : 
     376             :         SelectionAdaptor* getAdaptor( Atom selection );
     377             :         PixmapHolder* getPixmapHolder( Atom selection );
     378             : 
     379             :         // handle various events
     380             :         bool handleSelectionRequest( XSelectionRequestEvent& rRequest );
     381             :         bool handleSendPropertyNotify( XPropertyEvent& rNotify );
     382             :         bool handleReceivePropertyNotify( XPropertyEvent& rNotify );
     383             :         bool handleSelectionNotify( XSelectionEvent& rNotify );
     384             :         bool handleDragEvent( XEvent& rMessage );
     385             :         bool handleDropEvent( XClientMessageEvent& rMessage );
     386             : 
     387             :         // dnd helpers
     388             :         void sendDragStatus( Atom nDropAction );
     389             :         void sendDropPosition( bool bForce, Time eventTime );
     390             :         bool updateDragAction( int modifierState );
     391             :         int getXdndVersion( ::Window aXLIB_Window, ::Window& rProxy );
     392             :         Cursor createCursor( const unsigned char* pPointerData, const unsigned char* pMaskData, int width, int height, int hotX, int hotY );
     393             :         // coordinates on root ::Window
     394             :         void updateDragWindow( int nX, int nY, ::Window aRoot );
     395             : 
     396             :         bool getPasteData( Atom selection, Atom type, css::uno::Sequence< sal_Int8 >& rData );
     397             :         // returns true if conversion was successful
     398             :         bool convertData( const css::uno::Reference< css::datatransfer::XTransferable >& xTransferable,
     399             :                           Atom nType,
     400             :                           Atom nSelection,
     401             :                           int & rFormat,
     402             :                           css::uno::Sequence< sal_Int8 >& rData );
     403             :         bool sendData( SelectionAdaptor* pAdaptor, ::Window requestor, Atom target, Atom property, Atom selection );
     404             : 
     405             :         // thread dispatch loop
     406             :         public:
     407             :         // public for extern "C" stub
     408             :         static void run( void* );
     409             :         private:
     410             :         void dispatchEvent( int millisec );
     411             :         // drag thread dispatch
     412             :         public:
     413             :         // public for extern "C" stub
     414             :         static void runDragExecute( void* );
     415             :         private:
     416             :         void dragDoDispatch();
     417             :         bool handleXEvent( XEvent& rEvent );
     418             : 
     419             :         // compound text conversion
     420             :         OString convertToCompound( const OUString& rText );
     421             :         OUString convertFromCompound( const char* pText, int nLen = -1 );
     422             : 
     423             :         sal_Int8 getUserDragAction() const;
     424             :         sal_Int32 getSelectionTimeout();
     425             :     public:
     426             :         static SelectionManager& get( const OUString& rDisplayName = OUString() );
     427             : 
     428           0 :         Display * getDisplay() { return m_pDisplay; };
     429             :         ::Window getWindow() { return m_aWindow; };
     430             : 
     431             :         void registerHandler( Atom selection, SelectionAdaptor& rAdaptor );
     432             :         void deregisterHandler( Atom selection );
     433             :         bool requestOwnership( Atom selection );
     434             : 
     435             :         // allow for synchronization over one mutex for XClipboard
     436           0 :         osl::Mutex& getMutex() { return m_aMutex; }
     437             : 
     438             :         Atom getAtom( const OUString& rString );
     439             :         const OUString& getString( Atom nAtom );
     440             : 
     441             :         // type conversion
     442             :         // note: convertTypeToNative does NOT clear the list, so you can append
     443             :         // multiple types to the same list
     444             :         void convertTypeToNative( const OUString& rType, Atom selection, int& rFormat, ::std::list< Atom >& rConversions, bool bPushFront = false );
     445             :         OUString convertTypeFromNative( Atom nType, Atom selection, int& rFormat );
     446             :         void getNativeTypeList( const css::uno::Sequence< css::datatransfer::DataFlavor >& rTypes, std::list< Atom >& rOutTypeList, Atom targetselection );
     447             : 
     448             :         // methods for transferable
     449             :         bool getPasteDataTypes( Atom selection, css::uno::Sequence< css::datatransfer::DataFlavor >& rTypes );
     450             :         bool getPasteData( Atom selection, const OUString& rType, css::uno::Sequence< sal_Int8 >& rData );
     451             : 
     452             :         // for XDropTarget to register/deregister itself
     453             :         void registerDropTarget( ::Window aXLIB_Window, DropTarget* pTarget );
     454             :         void deregisterDropTarget( ::Window aXLIB_Window );
     455             : 
     456             :         // for XDropTarget{Drag|Drop}Context
     457             :         void accept( sal_Int8 dragOperation, ::Window aDropXLIB_Window, Time aTimestamp );
     458             :         void reject( ::Window aDropXLIB_Window, Time aTimestamp );
     459             :         void dropComplete( bool success, ::Window aDropXLIB_Window, Time aTimestamp );
     460             : 
     461             :         // for XDragSourceContext
     462           0 :         sal_Int32 getCurrentCursor() { return m_aCurrentCursor;}
     463             :         void setCursor( sal_Int32 cursor, ::Window aDropXLIB_Window, Time aTimestamp );
     464             :         void setImage( sal_Int32 image, ::Window aDropXLIB_Window, Time aTimestamp );
     465             :         void transferablesFlavorsChanged();
     466             : 
     467             :         void shutdown() throw();
     468             : 
     469             :         // XInitialization
     470             :         virtual void        SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& arguments ) throw( css::uno::Exception, std::exception ) SAL_OVERRIDE;
     471             : 
     472             :         // XEventHandler
     473             :         virtual sal_Bool    SAL_CALL handleEvent(const css::uno::Any& event)
     474             :             throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     475             : 
     476             :         // XDragSource
     477             :         virtual sal_Bool    SAL_CALL isDragImageSupported() throw(std::exception) SAL_OVERRIDE;
     478             :         virtual sal_Int32   SAL_CALL getDefaultCursor( sal_Int8 dragAction ) throw(std::exception) SAL_OVERRIDE;
     479             :         virtual void        SAL_CALL startDrag(
     480             :             const css::datatransfer::dnd::DragGestureEvent& trigger,
     481             :             sal_Int8 sourceActions, sal_Int32 cursor, sal_Int32 image,
     482             :             const css::uno::Reference< css::datatransfer::XTransferable >& transferable,
     483             :             const css::uno::Reference< css::datatransfer::dnd::XDragSourceListener >& listener
     484             :             ) throw(std::exception) SAL_OVERRIDE;
     485             : 
     486             :         // SelectionAdaptor for XdndSelection Drag (we are drag source)
     487             :         virtual css::uno::Reference< css::datatransfer::XTransferable > getTransferable() throw() SAL_OVERRIDE;
     488             :         virtual void clearTransferable() throw() SAL_OVERRIDE;
     489             :         virtual void fireContentsChanged() throw() SAL_OVERRIDE;
     490             :         virtual css::uno::Reference< css::uno::XInterface > getReference() throw() SAL_OVERRIDE;
     491             : 
     492             :         // XEventListener
     493             :         virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     494             : 
     495             :         // XTerminateListener
     496             :         virtual void SAL_CALL queryTermination( const css::lang::EventObject& aEvent )
     497             :                 throw( css::frame::TerminationVetoException, css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     498             :         virtual void SAL_CALL notifyTermination( const css::lang::EventObject& aEvent )
     499             :                 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     500             :     };
     501             : 
     502             :     css::uno::Sequence< OUString > SAL_CALL Xdnd_getSupportedServiceNames();
     503             :     css::uno::Reference< css::uno::XInterface > SAL_CALL Xdnd_createInstance(
     504             :         const css::uno::Reference< css::lang::XMultiServiceFactory > & xMultiServiceFactory);
     505             : 
     506             :     css::uno::Sequence< OUString > SAL_CALL Xdnd_dropTarget_getSupportedServiceNames();
     507             :     css::uno::Reference< css::uno::XInterface > SAL_CALL Xdnd_dropTarget_createInstance(
     508             :         const css::uno::Reference< css::lang::XMultiServiceFactory > & xMultiServiceFactory);
     509             : 
     510             : }
     511             : 
     512             : #endif
     513             : 
     514             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10