LeechCraft 0.6.70-19214-g121e5318a7
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
LC::Util::XWrapper Class Reference

#include "xwrapper.h"

Inheritance diagram for LC::Util::XWrapper:
Collaboration diagram for LC::Util::XWrapper:

Public Types

enum class  Layer {
  Top ,
  Bottom ,
  Normal
}

Signals

void windowListChanged ()
void activeWindowChanged ()
void desktopChanged ()
void windowNameChanged (ulong)
void windowIconChanged (ulong)
void windowDesktopChanged (ulong)
void windowStateChanged (ulong)
void windowActionsChanged (ulong)

Public Member Functions

 XWrapper (xcb_connection_t *, Display *, PrivateCtor)
xcb_connection_t * GetConnection () const
Display * GetDisplay () const
Window GetRootWindow () const
bool nativeEventFilter (const QByteArray &eventType, void *message, qintptr *result) override
void Sync ()
QList< Window > GetWindows ()
QString GetWindowTitle (Window)
QIcon GetWindowIcon (Window)
WinStateFlags GetWindowState (Window)
AllowedActionFlags GetWindowActions (Window)
Window GetActiveApp ()
bool IsLCWindow (Window)
bool ShouldShow (Window)
void Subscribe (Window)
void SetStrut (QWidget *, Qt::ToolBarArea)
void ClearStrut (QWidget *)
void SetStrut (Window wid, ulong left, ulong right, ulong top, ulong bottom, ulong leftStartY, ulong leftEndY, ulong rightStartY, ulong rightEndY, ulong topStartX, ulong topEndX, ulong bottomStartX, ulong bottomEndX)
void RaiseWindow (Window)
void MinimizeWindow (Window)
void MaximizeWindow (Window)
void UnmaximizeWindow (Window)
void ShadeWindow (Window)
void UnshadeWindow (Window)
void MoveWindowTo (Window, Layer)
void CloseWindow (Window)
void ResizeWindow (Window, int, int)
int GetDesktopCount ()
int GetCurrentDesktop ()
void SetCurrentDesktop (int)
QStringList GetDesktopNames ()
QString GetDesktopName (int, const QString &=QString())
int GetWindowDesktop (Window)
void MoveWindowToDesktop (Window, int)
QRect GetAvailableGeometry (QScreen &)
QRect GetAvailableGeometry (QWidget *)
Atom GetAtom (std::string_view str)
 Returns the atom denoting the given string.

Static Public Member Functions

static std::optional< XWrapper & > Instance ()

Detailed Description

Definition at line 36 of file xwrapper.h.

Member Enumeration Documentation

◆ Layer

enum class LC::Util::XWrapper::Layer
strong
Enumerator
Top 
Bottom 
Normal 

Definition at line 51 of file xwrapper.h.

Constructor & Destructor Documentation

◆ XWrapper()

LC::Util::XWrapper::XWrapper ( xcb_connection_t * conn,
Display * display,
PrivateCtor  )

Definition at line 35 of file xwrapper.cpp.

Member Function Documentation

◆ activeWindowChanged

void LC::Util::XWrapper::activeWindowChanged ( )
signal

◆ ClearStrut()

void LC::Util::XWrapper::ClearStrut ( QWidget * w)

Definition at line 425 of file xwrapper.cpp.

References GetAtom().

Here is the call graph for this function:

◆ CloseWindow()

void LC::Util::XWrapper::CloseWindow ( Window wid)

Definition at line 519 of file xwrapper.cpp.

References GetAtom(), and LC::Util::SourcePager.

Here is the call graph for this function:

◆ desktopChanged

void LC::Util::XWrapper::desktopChanged ( )
signal

◆ GetActiveApp()

Window LC::Util::XWrapper::GetActiveApp ( )

Definition at line 318 of file xwrapper.cpp.

References ShouldShow().

Here is the call graph for this function:

◆ GetAtom()

Atom LC::Util::XWrapper::GetAtom ( std::string_view str)

Returns the atom denoting the given string.

Parameters
[in]stringA view to a (null-terminated) string with the name of the atom.
Returns
An X11 Atom.
Note
The string pointed by str should be null-terminated — that is, std::strlen(str.data()) should be equal to str.size().

Definition at line 714 of file xwrapper.cpp.

References LC::Util::AsByteArray(), and LC::Util::ToByteArray().

Referenced by ClearStrut(), CloseWindow(), GetAvailableGeometry(), GetCurrentDesktop(), GetDesktopCount(), GetDesktopNames(), GetWindowActions(), GetWindowDesktop(), GetWindowIcon(), GetWindows(), GetWindowState(), GetWindowTitle(), IsLCWindow(), MaximizeWindow(), MinimizeWindow(), MoveWindowTo(), MoveWindowToDesktop(), RaiseWindow(), SetCurrentDesktop(), SetStrut(), ShadeWindow(), ShouldShow(), UnmaximizeWindow(), and UnshadeWindow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAvailableGeometry() [1/2]

QRect LC::Util::XWrapper::GetAvailableGeometry ( QScreen & screen)

Definition at line 651 of file xwrapper.cpp.

References GetAtom(), and GetWindows().

Referenced by GetAvailableGeometry().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAvailableGeometry() [2/2]

QRect LC::Util::XWrapper::GetAvailableGeometry ( QWidget * widget)

Definition at line 709 of file xwrapper.cpp.

References GetAvailableGeometry().

Here is the call graph for this function:

◆ GetConnection()

xcb_connection_t * LC::Util::XWrapper::GetConnection ( ) const

Definition at line 67 of file xwrapper.cpp.

◆ GetCurrentDesktop()

int LC::Util::XWrapper::GetCurrentDesktop ( )

Definition at line 582 of file xwrapper.cpp.

References GetAtom().

Here is the call graph for this function:

◆ GetDesktopCount()

int LC::Util::XWrapper::GetDesktopCount ( )

Definition at line 571 of file xwrapper.cpp.

References GetAtom().

Here is the call graph for this function:

◆ GetDesktopName()

QString LC::Util::XWrapper::GetDesktopName ( int desktop,
const QString & def = QString () )

Definition at line 620 of file xwrapper.cpp.

References GetDesktopNames().

Here is the call graph for this function:

◆ GetDesktopNames()

QStringList LC::Util::XWrapper::GetDesktopNames ( )

Definition at line 598 of file xwrapper.cpp.

References GetAtom().

Referenced by GetDesktopName().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDisplay()

Display * LC::Util::XWrapper::GetDisplay ( ) const

Definition at line 72 of file xwrapper.cpp.

◆ GetRootWindow()

Window LC::Util::XWrapper::GetRootWindow ( ) const

Definition at line 77 of file xwrapper.cpp.

◆ GetWindowActions()

◆ GetWindowDesktop()

int LC::Util::XWrapper::GetWindowDesktop ( Window wid)

Definition at line 625 of file xwrapper.cpp.

References GetAtom().

Here is the call graph for this function:

◆ GetWindowIcon()

QIcon LC::Util::XWrapper::GetWindowIcon ( Window wid)

Definition at line 224 of file xwrapper.cpp.

References GetAtom().

Here is the call graph for this function:

◆ GetWindows()

QList< Window > LC::Util::XWrapper::GetWindows ( )

Definition at line 175 of file xwrapper.cpp.

References GetAtom().

Referenced by GetAvailableGeometry().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWindowState()

WinStateFlags LC::Util::XWrapper::GetWindowState ( Window wid)

◆ GetWindowTitle()

QString LC::Util::XWrapper::GetWindowTitle ( Window wid)

Definition at line 187 of file xwrapper.cpp.

References GetAtom().

Here is the call graph for this function:

◆ Instance()

std::optional< XWrapper & > LC::Util::XWrapper::Instance ( )
static

Definition at line 52 of file xwrapper.cpp.

◆ IsLCWindow()

bool LC::Util::XWrapper::IsLCWindow ( Window wid)

Definition at line 331 of file xwrapper.cpp.

References GetAtom().

Referenced by Subscribe().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MaximizeWindow()

void LC::Util::XWrapper::MaximizeWindow ( Window wid)

Definition at line 474 of file xwrapper.cpp.

References GetAtom(), LC::Util::SourcePager, and LC::Util::StateAdd.

Here is the call graph for this function:

◆ MinimizeWindow()

void LC::Util::XWrapper::MinimizeWindow ( Window wid)

Definition at line 469 of file xwrapper.cpp.

References GetAtom().

Here is the call graph for this function:

◆ MoveWindowTo()

void LC::Util::XWrapper::MoveWindowTo ( Window wid,
Layer layer )

Definition at line 507 of file xwrapper.cpp.

References Bottom, GetAtom(), LC::Util::SourcePager, LC::Util::StateAdd, LC::Util::StateRemove, and Top.

Here is the call graph for this function:

◆ MoveWindowToDesktop()

void LC::Util::XWrapper::MoveWindowToDesktop ( Window wid,
int num )

Definition at line 638 of file xwrapper.cpp.

References GetAtom().

Here is the call graph for this function:

◆ nativeEventFilter()

bool LC::Util::XWrapper::nativeEventFilter ( const QByteArray & eventType,
void * message,
qintptr * result )
override

Definition at line 82 of file xwrapper.cpp.

◆ RaiseWindow()

void LC::Util::XWrapper::RaiseWindow ( Window wid)

Definition at line 464 of file xwrapper.cpp.

References GetAtom(), and LC::Util::SourcePager.

Here is the call graph for this function:

◆ ResizeWindow()

void LC::Util::XWrapper::ResizeWindow ( Window wid,
int width,
int height )

Definition at line 490 of file xwrapper.cpp.

◆ SetCurrentDesktop()

void LC::Util::XWrapper::SetCurrentDesktop ( int desktop)

Definition at line 593 of file xwrapper.cpp.

References GetAtom().

Here is the call graph for this function:

◆ SetStrut() [1/2]

void LC::Util::XWrapper::SetStrut ( QWidget * widget,
Qt::ToolBarArea area )

Definition at line 377 of file xwrapper.cpp.

References SetStrut().

Referenced by SetStrut().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetStrut() [2/2]

void LC::Util::XWrapper::SetStrut ( Window wid,
ulong left,
ulong right,
ulong top,
ulong bottom,
ulong leftStartY,
ulong leftEndY,
ulong rightStartY,
ulong rightEndY,
ulong topStartX,
ulong topEndX,
ulong bottomStartX,
ulong bottomEndX )

Definition at line 432 of file xwrapper.cpp.

References GetAtom().

Here is the call graph for this function:

◆ ShadeWindow()

void LC::Util::XWrapper::ShadeWindow ( Window wid)

Definition at line 495 of file xwrapper.cpp.

References GetAtom(), LC::Util::SourcePager, and LC::Util::StateAdd.

Here is the call graph for this function:

◆ ShouldShow()

bool LC::Util::XWrapper::ShouldShow ( Window wid)

Definition at line 339 of file xwrapper.cpp.

References GetAtom(), GetWindowState(), and LC::Util::SkipTaskbar.

Referenced by GetActiveApp().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Subscribe()

void LC::Util::XWrapper::Subscribe ( Window wid)

Definition at line 369 of file xwrapper.cpp.

References IsLCWindow().

Here is the call graph for this function:

◆ Sync()

void LC::Util::XWrapper::Sync ( )

Definition at line 169 of file xwrapper.cpp.

◆ UnmaximizeWindow()

void LC::Util::XWrapper::UnmaximizeWindow ( Window wid)

Definition at line 482 of file xwrapper.cpp.

References GetAtom(), LC::Util::SourcePager, and LC::Util::StateRemove.

Here is the call graph for this function:

◆ UnshadeWindow()

void LC::Util::XWrapper::UnshadeWindow ( Window wid)

Definition at line 501 of file xwrapper.cpp.

References GetAtom(), LC::Util::SourcePager, and LC::Util::StateRemove.

Here is the call graph for this function:

◆ windowActionsChanged

void LC::Util::XWrapper::windowActionsChanged ( ulong )
signal

◆ windowDesktopChanged

void LC::Util::XWrapper::windowDesktopChanged ( ulong )
signal

◆ windowIconChanged

void LC::Util::XWrapper::windowIconChanged ( ulong )
signal

◆ windowListChanged

void LC::Util::XWrapper::windowListChanged ( )
signal

◆ windowNameChanged

void LC::Util::XWrapper::windowNameChanged ( ulong )
signal

◆ windowStateChanged

void LC::Util::XWrapper::windowStateChanged ( ulong )
signal

The documentation for this class was generated from the following files:
  • /home/abuild/rpmbuild/BUILD/leechcraft-doc-0.6.70+git.19214.g121e5318a7-build/leechcraft-0.6.70-19214-g121e5318a7/src/util/x11/xwrapper.h
  • /home/abuild/rpmbuild/BUILD/leechcraft-doc-0.6.70+git.19214.g121e5318a7-build/leechcraft-0.6.70-19214-g121e5318a7/src/util/x11/xwrapper.cpp