LibreOffice Module desktop (master)  1
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
desktop::CallbackFlushHandler Class Referencefinal

#include <init.hxx>

Inheritance diagram for desktop::CallbackFlushHandler:
[legend]
Collaboration diagram for desktop::CallbackFlushHandler:
[legend]

Classes

struct  CallbackData
 
class  TimeoutIdle
 

Public Member Functions

 CallbackFlushHandler (LibreOfficeKitDocument *pDocument, LibreOfficeKitCallback pCallback, void *pData)
 
virtual ~CallbackFlushHandler () override
 
virtual void Invoke () override
 
void queue (const int type, const char *data)
 
void disableCallbacks ()
 Disables callbacks on this handler. More...
 
void enableCallbacks ()
 Enables callbacks on this handler. More...
 
bool callbacksDisabled () const
 Returns true iff callbacks are disabled. More...
 
void addViewStates (int viewId)
 
void removeViewStates (int viewId)
 
void setViewId (int viewId)
 
virtual void libreOfficeKitViewCallback (int nType, const char *pPayload) override
 
virtual void libreOfficeKitViewCallback (int nType, const char *pPayload, int nViewId) override
 
virtual void libreOfficeKitViewInvalidateTilesCallback (const tools::Rectangle *pRect, int nPart) override
 
- Public Member Functions inherited from Idle
 Idle (const char *pDebugName)
 
virtual void Start (bool bStartTimer=true) override
 
- Public Member Functions inherited from Timer
 Timer (const char *pDebugName)
 
 Timer (const Timer &rTimer)
 
virtual ~Timer () override
 
Timeroperator= (const Timer &rTimer)
 
void Invoke (Timer *arg)
 
void SetInvokeHandler (const Link< Timer *, void > &rLink)
 
void ClearInvokeHandler ()
 
void SetTimeout (sal_uInt64 nTimeoutMs)
 
sal_uInt64 GetTimeout () const
 
- Public Member Functions inherited from Task
 Task (const char *pDebugName)
 
 Task (const Task &rTask)
 
virtual ~Task () COVERITY_NOEXCEPT_FALSE
 
Taskoperator= (const Task &rTask)
 
void SetPriority (TaskPriority ePriority)
 
TaskPriority GetPriority () const
 
const char * GetDebugName () const
 
void Stop ()
 
bool IsActive () const
 
void SetStatic ()
 
bool IsStatic () const
 
- Public Member Functions inherited from SfxLokCallbackInterface
virtual ~SfxLokCallbackInterface ()
 

Private Types

typedef std::vector< intqueue_type1
 
typedef std::vector< CallbackDataqueue_type2
 

Private Member Functions

bool removeAll (int type)
 
bool removeAll (int type, const std::function< bool(const CallbackData &)> &rTestFunc)
 
bool processInvalidateTilesEvent (int type, CallbackData &aCallbackData)
 
bool processWindowEvent (int type, CallbackData &aCallbackData)
 
queue_type2::iterator toQueue2 (queue_type1::iterator)
 
queue_type2::reverse_iterator toQueue2 (queue_type1::reverse_iterator)
 
void queue (const int type, CallbackData &data)
 

Private Attributes

queue_type1 m_queue1
 we frequently want to scan the queue, and mostly when we do so, we only care about the element type so we split the queue in 2 to make the scanning cache friendly. More...
 
queue_type2 m_queue2
 
std::map< int, std::string > m_states
 
std::unordered_map< int, std::unordered_map< int, std::string > > m_viewStates
 
LibreOfficeKitDocument * m_pDocument
 
int m_viewId = -1
 
LibreOfficeKitCallback m_pCallback
 
voidm_pData
 
int m_nDisableCallbacks
 
std::mutex m_mutex
 
TimeoutIdle m_TimeoutIdle
 

Additional Inherited Members

- Protected Member Functions inherited from Idle
virtual sal_uInt64 UpdateMinPeriod (sal_uInt64 nTimeNow) const override
 
 Idle (bool bAuto, const char *pDebugName)
 
- Protected Member Functions inherited from Timer
virtual void SetDeletionFlags () override
 
 Timer (bool bAuto, const char *pDebugName)
 
- Protected Member Functions inherited from Task
const ImplSchedulerDataGetSchedulerData () const
 
- Static Protected Member Functions inherited from Task
static void StartTimer (sal_uInt64 nMS)
 

Detailed Description

Definition at line 80 of file init.hxx.

Member Typedef Documentation

typedef std::vector<int> desktop::CallbackFlushHandler::queue_type1
private

Definition at line 164 of file init.hxx.

Definition at line 165 of file init.hxx.

Constructor & Destructor Documentation

CallbackFlushHandler::CallbackFlushHandler ( LibreOfficeKitDocument *  pDocument,
LibreOfficeKitCallback  pCallback,
void pData 
)
explicit

Definition at line 1420 of file init.cxx.

References m_states, and Task::SetPriority().

CallbackFlushHandler::~CallbackFlushHandler ( )
overridevirtual

Definition at line 1445 of file init.cxx.

References Task::Stop().

Member Function Documentation

void CallbackFlushHandler::addViewStates ( int  viewId)

Definition at line 2151 of file init.cxx.

References m_viewStates.

bool desktop::CallbackFlushHandler::callbacksDisabled ( ) const
inline

Returns true iff callbacks are disabled.

Definition at line 96 of file init.hxx.

Referenced by queue().

void desktop::CallbackFlushHandler::disableCallbacks ( )
inline

Disables callbacks on this handler.

Must match with identical count of enableCallbacks. Used during painting and changing views.

Definition at line 91 of file init.hxx.

void desktop::CallbackFlushHandler::enableCallbacks ( )
inline

Enables callbacks on this handler.

Must match with identical count of disableCallbacks. Used during painting and changing views.

Definition at line 94 of file init.hxx.

void CallbackFlushHandler::Invoke ( )
overridevirtual
void CallbackFlushHandler::libreOfficeKitViewCallback ( int  nType,
const char *  pPayload 
)
overridevirtual

Implements SfxLokCallbackInterface.

Definition at line 1462 of file init.cxx.

References queue().

void CallbackFlushHandler::libreOfficeKitViewCallback ( int  nType,
const char *  pPayload,
int  nViewId 
)
overridevirtual

Implements SfxLokCallbackInterface.

Definition at line 1468 of file init.cxx.

References queue().

void CallbackFlushHandler::libreOfficeKitViewInvalidateTilesCallback ( const tools::Rectangle pRect,
int  nPart 
)
overridevirtual

Implements SfxLokCallbackInterface.

Definition at line 1474 of file init.cxx.

References queue().

bool CallbackFlushHandler::processInvalidateTilesEvent ( int  type,
CallbackData aCallbackData 
)
private
bool CallbackFlushHandler::processWindowEvent ( int  type,
CallbackData aCallbackData 
)
private
void CallbackFlushHandler::queue ( const int  type,
const char *  data 
)
void CallbackFlushHandler::queue ( const int  type,
CallbackData data 
)
private
bool CallbackFlushHandler::removeAll ( int  type)
private

Definition at line 2113 of file init.cxx.

References m_queue1, m_queue2, and toQueue2().

Referenced by processInvalidateTilesEvent(), processWindowEvent(), and queue().

bool CallbackFlushHandler::removeAll ( int  type,
const std::function< bool(const CallbackData &)> &  rTestFunc 
)
private

Definition at line 2129 of file init.cxx.

References m_queue1, m_queue2, and toQueue2().

void CallbackFlushHandler::removeViewStates ( int  viewId)

Definition at line 2160 of file init.cxx.

References m_viewStates.

void desktop::CallbackFlushHandler::setViewId ( int  viewId)
inline

Definition at line 101 of file init.hxx.

queue_type2::iterator desktop::CallbackFlushHandler::toQueue2 ( queue_type1::iterator  )
private
queue_type2::reverse_iterator desktop::CallbackFlushHandler::toQueue2 ( queue_type1::reverse_iterator  )
private

Member Data Documentation

std::mutex desktop::CallbackFlushHandler::m_mutex
private

Definition at line 186 of file init.hxx.

Referenced by Invoke(), and queue().

int desktop::CallbackFlushHandler::m_nDisableCallbacks
private

Definition at line 185 of file init.hxx.

LibreOfficeKitCallback desktop::CallbackFlushHandler::m_pCallback
private

Definition at line 183 of file init.hxx.

Referenced by Invoke().

void* desktop::CallbackFlushHandler::m_pData
private

Definition at line 184 of file init.hxx.

Referenced by Invoke().

LibreOfficeKitDocument* desktop::CallbackFlushHandler::m_pDocument
private

Definition at line 181 of file init.hxx.

Referenced by processWindowEvent(), and queue().

queue_type1 desktop::CallbackFlushHandler::m_queue1
private

we frequently want to scan the queue, and mostly when we do so, we only care about the element type so we split the queue in 2 to make the scanning cache friendly.

Definition at line 177 of file init.hxx.

Referenced by Invoke(), processInvalidateTilesEvent(), processWindowEvent(), queue(), and removeAll().

queue_type2 desktop::CallbackFlushHandler::m_queue2
private

Definition at line 178 of file init.hxx.

Referenced by Invoke(), processWindowEvent(), queue(), and removeAll().

std::map<int, std::string> desktop::CallbackFlushHandler::m_states
private

Definition at line 179 of file init.hxx.

Referenced by CallbackFlushHandler(), and Invoke().

TimeoutIdle desktop::CallbackFlushHandler::m_TimeoutIdle
private

Definition at line 195 of file init.hxx.

Referenced by Invoke(), and queue().

int desktop::CallbackFlushHandler::m_viewId = -1
private

Definition at line 182 of file init.hxx.

Referenced by Invoke().

std::unordered_map<int, std::unordered_map<int, std::string> > desktop::CallbackFlushHandler::m_viewStates
private

Definition at line 180 of file init.hxx.

Referenced by addViewStates(), Invoke(), and removeViewStates().


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