LibreOffice Module dtrans (master)  1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
CMtaOleClipboard Class Reference

#include <MtaOleClipb.hxx>

Collaboration diagram for CMtaOleClipboard:
[legend]

Public Member Functions

typedef void (WINAPI *LPFNC_CLIPVIEWER_CALLBACK_t)(void)
 
 CMtaOleClipboard ()
 
 ~CMtaOleClipboard ()
 
HRESULT setClipboard (IDataObject *pIDataObject)
 
HRESULT getClipboard (IDataObject **ppIDataObject)
 
HRESULT flushClipboard ()
 
bool registerClipViewer (LPFNC_CLIPVIEWER_CALLBACK_t pfncClipViewerCallback)
 

Private Member Functions

unsigned int run ()
 
void createMtaOleReqWnd ()
 
bool postMessage (UINT msg, WPARAM wParam=0, LPARAM lParam=0)
 
LRESULT sendMessage (UINT msg, WPARAM wParam=0, LPARAM lParam=0)
 
bool onRegisterClipViewer (LPFNC_CLIPVIEWER_CALLBACK_t pfncClipViewerCallback)
 
LRESULT onClipboardUpdate ()
 
bool WaitForThreadReady () const
 
 CMtaOleClipboard (const CMtaOleClipboard &)
 
CMtaOleClipboardoperator= (const CMtaOleClipboard &)
 

Static Private Member Functions

static HRESULT onSetClipboard (IDataObject *pIDataObject)
 
static HRESULT onGetClipboard (LPSTREAM *ppStream)
 
static HRESULT onFlushClipboard ()
 
static LRESULT CALLBACK mtaOleReqWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static unsigned int WINAPI oleThreadProc (LPVOID pParam)
 
static unsigned int WINAPI clipboardChangedNotifierThreadProc (LPVOID pParam)
 

Private Attributes

HANDLE m_hOleThread
 
unsigned m_uOleThreadId
 
HANDLE m_hEvtThrdReady
 
HWND m_hwndMtaOleReqWnd
 
HANDLE m_hEvtWndDisposed
 
ATOM m_MtaOleReqWndClassAtom
 
LPFNC_CLIPVIEWER_CALLBACK_t m_pfncClipViewerCallback
 
bool m_bInRegisterClipViewer
 
bool m_bRunClipboardNotifierThread
 
HANDLE m_hClipboardChangedNotifierThread
 
HANDLE m_hClipboardChangedNotifierEvents [2]
 
HANDLE & m_hClipboardChangedEvent
 
HANDLE & m_hTerminateClipboardChangedNotifierEvent
 
osl::Mutex m_ClipboardChangedEventCountMutex
 
sal_Int32 m_ClipboardChangedEventCount
 
osl::Mutex m_pfncClipViewerCallbackMutex
 

Static Private Attributes

static CMtaOleClipboards_theMtaOleClipboardInst = nullptr
 

Friends

LRESULT CALLBACK mtaOleReqWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 

Detailed Description

Definition at line 35 of file MtaOleClipb.hxx.

Constructor & Destructor Documentation

CMtaOleClipboard::CMtaOleClipboard ( )
CMtaOleClipboard::~CMtaOleClipboard ( )
CMtaOleClipboard::CMtaOleClipboard ( const CMtaOleClipboard )
private

Member Function Documentation

unsigned int WINAPI CMtaOleClipboard::clipboardChangedNotifierThreadProc ( LPVOID  pParam)
staticprivate
void CMtaOleClipboard::createMtaOleReqWnd ( )
private

Definition at line 606 of file MtaOleClipb.cxx.

References m_hwndMtaOleReqWnd, m_MtaOleReqWndClassAtom, and mtaOleReqWndProc().

Referenced by run().

HRESULT CMtaOleClipboard::flushClipboard ( )
HRESULT CMtaOleClipboard::getClipboard ( IDataObject **  ppIDataObject)
LRESULT CALLBACK CMtaOleClipboard::mtaOleReqWndProc ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
staticprivate
unsigned int WINAPI CMtaOleClipboard::oleThreadProc ( LPVOID  pParam)
staticprivate

Definition at line 664 of file MtaOleClipb.cxx.

References run().

Referenced by CMtaOleClipboard().

LRESULT CMtaOleClipboard::onClipboardUpdate ( )
private
HRESULT CMtaOleClipboard::onFlushClipboard ( )
staticprivate

Definition at line 484 of file MtaOleClipb.cxx.

Referenced by mtaOleReqWndProc().

HRESULT CMtaOleClipboard::onGetClipboard ( LPSTREAM *  ppStream)
staticprivate

Definition at line 466 of file MtaOleClipb.cxx.

References hr, and MarshalIDataObjectInStream().

Referenced by mtaOleReqWndProc().

bool CMtaOleClipboard::onRegisterClipViewer ( LPFNC_CLIPVIEWER_CALLBACK_t  pfncClipViewerCallback)
private
HRESULT CMtaOleClipboard::onSetClipboard ( IDataObject *  pIDataObject)
staticprivate

Definition at line 461 of file MtaOleClipb.cxx.

Referenced by mtaOleReqWndProc().

CMtaOleClipboard& CMtaOleClipboard::operator= ( const CMtaOleClipboard )
private
bool CMtaOleClipboard::postMessage ( UINT  msg,
WPARAM  wParam = 0,
LPARAM  lParam = 0 
)
private

Definition at line 517 of file MtaOleClipb.cxx.

References m_hwndMtaOleReqWnd, and SAL_WARN_IF.

Referenced by flushClipboard(), getClipboard(), registerClipViewer(), and setClipboard().

bool CMtaOleClipboard::registerClipViewer ( LPFNC_CLIPVIEWER_CALLBACK_t  pfncClipViewerCallback)
unsigned int CMtaOleClipboard::run ( )
private

Definition at line 635 of file MtaOleClipb.cxx.

References createMtaOleReqWnd(), hr, m_hEvtThrdReady, and m_hwndMtaOleReqWnd.

Referenced by oleThreadProc().

LRESULT CMtaOleClipboard::sendMessage ( UINT  msg,
WPARAM  wParam = 0,
LPARAM  lParam = 0 
)
private

Definition at line 509 of file MtaOleClipb.cxx.

References m_hwndMtaOleReqWnd.

Referenced by ~CMtaOleClipboard().

HRESULT CMtaOleClipboard::setClipboard ( IDataObject *  pIDataObject)

Definition at line 373 of file MtaOleClipb.cxx.

References m_uOleThreadId, postMessage(), and WaitForThreadReady().

Referenced by CWinClipbImpl::setContents().

typedef CMtaOleClipboard::void ( WINAPI *  LPFNC_CLIPVIEWER_CALLBACK_t)
bool CMtaOleClipboard::WaitForThreadReady ( ) const
private

Definition at line 716 of file MtaOleClipb.cxx.

References m_hEvtThrdReady.

Referenced by flushClipboard(), getClipboard(), registerClipViewer(), and setClipboard().

Friends And Related Function Documentation

LRESULT CALLBACK mtaOleReqWndProc ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
friend

Member Data Documentation

bool CMtaOleClipboard::m_bInRegisterClipViewer
private

Definition at line 93 of file MtaOleClipb.hxx.

Referenced by onClipboardUpdate(), and onRegisterClipViewer().

bool CMtaOleClipboard::m_bRunClipboardNotifierThread
private

Definition at line 95 of file MtaOleClipb.hxx.

Referenced by clipboardChangedNotifierThreadProc(), and ~CMtaOleClipboard().

sal_Int32 CMtaOleClipboard::m_ClipboardChangedEventCount
private

Definition at line 101 of file MtaOleClipb.hxx.

Referenced by clipboardChangedNotifierThreadProc(), and onClipboardUpdate().

osl::Mutex CMtaOleClipboard::m_ClipboardChangedEventCountMutex
private

Definition at line 100 of file MtaOleClipb.hxx.

Referenced by clipboardChangedNotifierThreadProc(), and onClipboardUpdate().

HANDLE& CMtaOleClipboard::m_hClipboardChangedEvent
private

Definition at line 98 of file MtaOleClipb.hxx.

Referenced by clipboardChangedNotifierThreadProc(), and onClipboardUpdate().

HANDLE CMtaOleClipboard::m_hClipboardChangedNotifierEvents[2]
private
HANDLE CMtaOleClipboard::m_hClipboardChangedNotifierThread
private

Definition at line 96 of file MtaOleClipb.hxx.

Referenced by CMtaOleClipboard(), and ~CMtaOleClipboard().

HANDLE CMtaOleClipboard::m_hEvtThrdReady
private

Definition at line 88 of file MtaOleClipb.hxx.

Referenced by CMtaOleClipboard(), run(), WaitForThreadReady(), and ~CMtaOleClipboard().

HANDLE CMtaOleClipboard::m_hEvtWndDisposed
private
HANDLE CMtaOleClipboard::m_hOleThread
private

Definition at line 86 of file MtaOleClipb.hxx.

Referenced by CMtaOleClipboard(), and ~CMtaOleClipboard().

HANDLE& CMtaOleClipboard::m_hTerminateClipboardChangedNotifierEvent
private

Definition at line 99 of file MtaOleClipb.hxx.

Referenced by ~CMtaOleClipboard().

HWND CMtaOleClipboard::m_hwndMtaOleReqWnd
private
ATOM CMtaOleClipboard::m_MtaOleReqWndClassAtom
private

Definition at line 91 of file MtaOleClipb.hxx.

Referenced by createMtaOleReqWnd(), and ~CMtaOleClipboard().

LPFNC_CLIPVIEWER_CALLBACK_t CMtaOleClipboard::m_pfncClipViewerCallback
private
osl::Mutex CMtaOleClipboard::m_pfncClipViewerCallbackMutex
private

Definition at line 103 of file MtaOleClipb.hxx.

Referenced by clipboardChangedNotifierThreadProc(), and onRegisterClipViewer().

unsigned CMtaOleClipboard::m_uOleThreadId
private
CMtaOleClipboard * CMtaOleClipboard::s_theMtaOleClipboardInst = nullptr
staticprivate

Definition at line 105 of file MtaOleClipb.hxx.

Referenced by CMtaOleClipboard(), and mtaOleReqWndProc().


The documentation for this class was generated from the following files: