LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
LC::Util::XWrapper Class Reference

#include "xwrapper.h"

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

Public Types

enum  Layer {
  Layer::Top,
  Layer::Bottom,
  Layer::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

Display * GetDisplay () const
 
Window GetRootWindow () const
 
bool nativeEventFilter (const QByteArray &eventType, void *message, long *result) override
 
void Sync ()
 
QList< WindowGetWindows ()
 
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 (int screen=-1)
 
QRect GetAvailableGeometry (QWidget *)
 
Atom GetAtom (std::string_view str)
 Returns the atom denoting the given string. More...
 

Static Public Member Functions

static XWrapperInstance ()
 

Detailed Description

Definition at line 33 of file xwrapper.h.

Member Enumeration Documentation

◆ Layer

Enumerator
Top 
Bottom 
Normal 

Definition at line 45 of file xwrapper.h.

Member Function Documentation

◆ activeWindowChanged

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

Referenced by CloseWindow().

+ Here is the caller graph for this function:

◆ ClearStrut()

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

Definition at line 416 of file xwrapper.cpp.

◆ CloseWindow()

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

◆ desktopChanged

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

Referenced by CloseWindow().

+ Here is the caller graph for this function:

◆ GetActiveApp()

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

Definition at line 309 of file xwrapper.cpp.

◆ 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 710 of file xwrapper.cpp.

Referenced by CloseWindow(), GetAvailableGeometry(), GetDesktopName(), MinimizeWindow(), RaiseWindow(), ResizeWindow(), SetCurrentDesktop(), SetStrut(), ShadeWindow(), and UnshadeWindow().

+ Here is the caller graph for this function:

◆ GetAvailableGeometry() [1/2]

QRect LC::Util::XWrapper::GetAvailableGeometry ( int  screen = -1)

Definition at line 642 of file xwrapper.cpp.

References GetAtom().

+ Here is the call graph for this function:

◆ GetAvailableGeometry() [2/2]

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

Definition at line 705 of file xwrapper.cpp.

References LC::Util::AsByteArray().

+ Here is the call graph for this function:

◆ GetCurrentDesktop()

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

Definition at line 573 of file xwrapper.cpp.

◆ GetDesktopCount()

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

Definition at line 562 of file xwrapper.cpp.

◆ GetDesktopName()

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

Definition at line 611 of file xwrapper.cpp.

References GetAtom().

+ Here is the call graph for this function:

◆ GetDesktopNames()

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

Definition at line 589 of file xwrapper.cpp.

◆ GetDisplay()

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

Definition at line 63 of file xwrapper.cpp.

◆ GetRootWindow()

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

Definition at line 68 of file xwrapper.cpp.

◆ GetWindowActions()

AllowedActionFlags LC::Util::XWrapper::GetWindowActions ( Window  wid)

Definition at line 287 of file xwrapper.cpp.

References LC::Util::Resize.

◆ GetWindowDesktop()

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

Definition at line 616 of file xwrapper.cpp.

◆ GetWindowIcon()

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

Definition at line 215 of file xwrapper.cpp.

◆ GetWindows()

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

Definition at line 166 of file xwrapper.cpp.

◆ GetWindowState()

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

Definition at line 265 of file xwrapper.cpp.

References LC::Util::Sticky.

◆ GetWindowTitle()

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

Definition at line 178 of file xwrapper.cpp.

◆ Instance()

XWrapper & LC::Util::XWrapper::Instance ( )
static

Definition at line 57 of file xwrapper.cpp.

◆ IsLCWindow()

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

Definition at line 322 of file xwrapper.cpp.

◆ MaximizeWindow()

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

Definition at line 465 of file xwrapper.cpp.

◆ MinimizeWindow()

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

Definition at line 460 of file xwrapper.cpp.

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

+ Here is the call graph for this function:

◆ MoveWindowTo()

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

Definition at line 498 of file xwrapper.cpp.

◆ MoveWindowToDesktop()

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

Definition at line 629 of file xwrapper.cpp.

◆ nativeEventFilter()

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

Definition at line 73 of file xwrapper.cpp.

◆ RaiseWindow()

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

Definition at line 455 of file xwrapper.cpp.

References GetAtom().

+ Here is the call graph for this function:

◆ ResizeWindow()

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

Definition at line 481 of file xwrapper.cpp.

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

+ Here is the call graph for this function:

◆ SetCurrentDesktop()

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

Definition at line 584 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 368 of file xwrapper.cpp.

◆ 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 423 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 486 of file xwrapper.cpp.

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

+ Here is the call graph for this function:

◆ ShouldShow()

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

Definition at line 330 of file xwrapper.cpp.

◆ Subscribe()

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

Definition at line 360 of file xwrapper.cpp.

◆ Sync()

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

Definition at line 160 of file xwrapper.cpp.

◆ UnmaximizeWindow()

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

Definition at line 473 of file xwrapper.cpp.

◆ UnshadeWindow()

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

Definition at line 492 of file xwrapper.cpp.

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

+ Here is the call graph for this function:

◆ windowActionsChanged

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

Referenced by CloseWindow().

+ Here is the caller graph for this function:

◆ windowDesktopChanged

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

Referenced by CloseWindow().

+ Here is the caller graph for this function:

◆ windowIconChanged

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

Referenced by CloseWindow().

+ Here is the caller graph for this function:

◆ windowListChanged

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

Referenced by CloseWindow().

+ Here is the caller graph for this function:

◆ windowNameChanged

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

Referenced by CloseWindow().

+ Here is the caller graph for this function:

◆ windowStateChanged

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

Referenced by CloseWindow().

+ Here is the caller graph for this function:

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