KWin
Loading...
Searching...
No Matches
Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
KWin::Xwl::Selection Class Referenceabstract

#include <selection.h>

Inheritance diagram for KWin::Xwl::Selection:
KWin::Xwl::Clipboard KWin::Xwl::Dnd KWin::Xwl::Primary

Signals

void transferFinished (xcb_timestamp_t eventTime)
 

Public Member Functions

bool handleXfixesNotify (xcb_xfixes_selection_notify_event_t *event)
 
bool filterEvent (xcb_generic_event_t *event)
 
xcb_atom_t atom () const
 
xcb_window_t window () const
 
void overwriteRequestorWindow (xcb_window_t window)
 

Static Public Member Functions

static xcb_atom_t mimeTypeToAtom (const QString &mimeType)
 
static xcb_atom_t mimeTypeToAtomLiteral (const QString &mimeType)
 
static QStringList atomToMimeTypes (xcb_atom_t atom)
 
static QString atomName (xcb_atom_t atom)
 
static void sendSelectionNotify (xcb_selection_request_event_t *event, bool success)
 

Protected Member Functions

 Selection (xcb_atom_t atom, QObject *parent)
 
void registerXfixes ()
 
virtual void doHandleXfixesNotify (xcb_xfixes_selection_notify_event_t *event)=0
 
virtual void x11OfferLost ()=0
 
virtual void x11OffersChanged (const QStringList &added, const QStringList &removed)=0
 
virtual bool handleClientMessage (xcb_client_message_event_t *event)
 
void setWlSource (WlSource *source)
 
WlSourcewlSource () const
 
void createX11Source (xcb_xfixes_selection_notify_event_t *event)
 
X11Sourcex11Source () const
 
void ownSelection (bool own)
 
void setWindow (xcb_window_t window)
 

Detailed Description

Base class representing generic X selections and their respective Wayland counter-parts.

The class needs to be subclassed and adjusted according to the selection, but provides common fucntionality to be expected of all selections.

A selection should exist through the whole runtime of an Xwayland session.

Independently of each other the class holds the currently active source instance and active transfers relative to the represented selection.

Definition at line 44 of file selection.h.

Constructor & Destructor Documentation

◆ Selection()

KWin::Xwl::Selection::Selection ( xcb_atom_t atom,
QObject * parent )
protected

Definition at line 80 of file selection.cpp.

Member Function Documentation

◆ atom()

xcb_atom_t KWin::Xwl::Selection::atom ( ) const
inline

Definition at line 59 of file selection.h.

◆ atomName()

QString KWin::Xwl::Selection::atomName ( xcb_atom_t atom)
static

Definition at line 48 of file selection.cpp.

◆ atomToMimeTypes()

QStringList KWin::Xwl::Selection::atomToMimeTypes ( xcb_atom_t atom)
static

Definition at line 63 of file selection.cpp.

◆ createX11Source()

void KWin::Xwl::Selection::createX11Source ( xcb_xfixes_selection_notify_event_t * event)
protected

Definition at line 184 of file selection.cpp.

◆ doHandleXfixesNotify()

virtual void KWin::Xwl::Selection::doHandleXfixesNotify ( xcb_xfixes_selection_notify_event_t * event)
protectedpure virtual

Implemented in KWin::Xwl::Dnd.

◆ filterEvent()

bool KWin::Xwl::Selection::filterEvent ( xcb_generic_event_t * event)

Definition at line 117 of file selection.cpp.

◆ handleClientMessage()

virtual bool KWin::Xwl::Selection::handleClientMessage ( xcb_client_message_event_t * event)
inlineprotectedvirtual

Reimplemented in KWin::Xwl::Dnd.

Definition at line 80 of file selection.h.

◆ handleXfixesNotify()

bool KWin::Xwl::Selection::handleXfixesNotify ( xcb_xfixes_selection_notify_event_t * event)

Definition at line 90 of file selection.cpp.

◆ mimeTypeToAtom()

xcb_atom_t KWin::Xwl::Selection::mimeTypeToAtom ( const QString & mimeType)
static

Definition at line 29 of file selection.cpp.

◆ mimeTypeToAtomLiteral()

xcb_atom_t KWin::Xwl::Selection::mimeTypeToAtomLiteral ( const QString & mimeType)
static

Definition at line 43 of file selection.cpp.

◆ overwriteRequestorWindow()

void KWin::Xwl::Selection::overwriteRequestorWindow ( xcb_window_t window)

Definition at line 216 of file selection.cpp.

◆ ownSelection()

void KWin::Xwl::Selection::ownSelection ( bool own)
protected

Definition at line 198 of file selection.cpp.

◆ registerXfixes()

void KWin::Xwl::Selection::registerXfixes ( )
protected

Definition at line 159 of file selection.cpp.

◆ sendSelectionNotify()

void KWin::Xwl::Selection::sendSelectionNotify ( xcb_selection_request_event_t * event,
bool success )
static

Definition at line 136 of file selection.cpp.

◆ setWindow()

void KWin::Xwl::Selection::setWindow ( xcb_window_t window)
inlineprotected

Definition at line 97 of file selection.h.

◆ setWlSource()

void KWin::Xwl::Selection::setWlSource ( WlSource * source)
protected

Definition at line 170 of file selection.cpp.

◆ transferFinished

void KWin::Xwl::Selection::transferFinished ( xcb_timestamp_t eventTime)
signal

◆ window()

xcb_window_t KWin::Xwl::Selection::window ( ) const
inline

Definition at line 63 of file selection.h.

◆ wlSource()

WlSource * KWin::Xwl::Selection::wlSource ( ) const
inlineprotected

Definition at line 86 of file selection.h.

◆ x11OfferLost()

virtual void KWin::Xwl::Selection::x11OfferLost ( )
protectedpure virtual

Implemented in KWin::Xwl::Dnd.

◆ x11OffersChanged()

virtual void KWin::Xwl::Selection::x11OffersChanged ( const QStringList & added,
const QStringList & removed )
protectedpure virtual

Implemented in KWin::Xwl::Dnd.

◆ x11Source()

X11Source * KWin::Xwl::Selection::x11Source ( ) const
inlineprotected

Definition at line 91 of file selection.h.


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