31 #include <QtGui/QWidget>
34 #include <X11/Xutil.h>
35 #include <X11/Xatom.h>
41 struct NETRootInfoPrivate;
42 struct NETWinInfoPrivate;
98 NETRootInfo(Display *display, Window supportWindow,
const char *wmName,
99 const unsigned long properties[],
int properties_size,
100 int screen = -1,
bool doActivate =
true);
125 int screen = -1,
bool doActivate =
true);
134 bool doActivate =
true);
153 Display *x11Display()
const;
160 Window rootWindow()
const;
167 Window supportWindow()
const;
174 const char *wmName()
const;
181 int screenNumber()
const;
208 void setSupported(
NET::State property,
bool on =
true );
214 void setSupported(
NET::Action property,
bool on =
true );
249 const unsigned long* supportedProperties()
const;
255 const unsigned long* passedProperties()
const;
264 const Window *clientList()
const;
273 int clientListCount()
const;
283 const Window *clientListStacking()
const;
292 int clientListStackingCount()
const;
308 NETSize desktopGeometry(
int desktop)
const;
321 NETPoint desktopViewport(
int desktop)
const;
330 NETRect workArea(
int desktop)
const;
339 const char *desktopName(
int desktop)
const;
348 const Window *virtualRoots( )
const;
357 int virtualRootsCount()
const;
368 QSize desktopLayoutColumnsRows()
const;
386 int numberOfDesktops(
bool ignore_viewport =
false )
const;
399 int currentDesktop(
bool ignore_viewport =
false )
const;
406 Window activeWindow()
const;
425 void setClientList(
const Window *windows,
unsigned int count);
435 void setClientListStacking(
const Window *windows,
unsigned int count);
447 void setCurrentDesktop(
int desktop,
bool ignore_viewport =
false);
463 void setDesktopGeometry(
int desktop,
const NETSize &geometry);
476 void setDesktopViewport(
int desktop,
const NETPoint &viewport);
487 void setNumberOfDesktops(
int numberOfDesktops);
500 void setDesktopName(
int desktop,
const char *desktopName);
513 Time timestamp, Window active_window);
521 void setActiveWindow(Window window);
530 void setWorkArea(
int desktop,
const NETRect &workArea);
539 void setVirtualRoots(
const Window *windows,
unsigned int count);
551 void setShowingDesktop(
bool showing );
555 bool showingDesktop()
const;
570 void closeWindowRequest(Window window);
587 void moveResizeRequest(Window window,
int x_root,
int y_root,
588 Direction direction);
603 void moveResizeWindowRequest(Window window,
int flags,
int x,
int y,
int width,
int height );
608 void restackRequest(Window window, RequestSource source, Window above,
int detail, Time timestamp);
614 void sendPing( Window window, Time timestamp );
623 void takeActivity( Window window, Time timestamp,
long flags );
639 void event( XEvent* event,
unsigned long*
properties,
int properties_size );
652 unsigned long event(XEvent *event);
662 virtual void addClient(Window window) { Q_UNUSED(window); }
733 virtual void moveResize(Window window,
int x_root,
int y_root,
734 unsigned long direction) { Q_UNUSED(window); Q_UNUSED(x_root); Q_UNUSED(y_root); Q_UNUSED(direction); }
742 virtual void gotPing( Window window, Time timestamp ) { Q_UNUSED(window); Q_UNUSED(timestamp); }
754 Time timestamp, Window active_window ) { Q_UNUSED(window); Q_UNUSED(src); Q_UNUSED(timestamp); Q_UNUSED(active_window);}
768 virtual void moveResizeWindow(Window window,
int flags,
int x,
int y,
int width,
int height) { Q_UNUSED(window); Q_UNUSED(flags); Q_UNUSED(x); Q_UNUSED(y); Q_UNUSED(width); Q_UNUSED(height); }
782 Window above,
int detail, Time timestamp) { Q_UNUSED(window); Q_UNUSED(source); Q_UNUSED(above); Q_UNUSED(detail); Q_UNUSED(timestamp); }
790 virtual void gotTakeActivity(Window window, Time timestamp,
long flags ) { Q_UNUSED(window); Q_UNUSED(timestamp); Q_UNUSED(flags); }
802 void update(
const unsigned long[] );
804 void setDefaultProperties();
805 void updateSupportedProperties(
Atom atom );
811 virtual void virtual_hook(
int id,
void* data );
813 NETRootInfoPrivate *p;
859 NETWinInfo(Display *display, Window window, Window rootWindow,
860 const unsigned long properties[],
int properties_size,
898 bool hasNETSupport()
const;
904 const unsigned long* passedProperties()
const;
919 unsigned long state()
const;
948 WindowType windowType(
unsigned long supported_types )
const;
955 bool hasWindowType()
const;
962 const char *
name()
const;
969 const char *visibleName()
const;
980 const char *iconName()
const;
991 const char *visibleIconName()
const;
1006 int desktop(
bool ignore_viewport =
false )
const;
1020 Bool handledIcons()
const;
1028 MappingState mappingState()
const;
1046 void setIconGeometry(
NETRect geometry);
1071 void setState(
unsigned long state,
unsigned long mask);
1079 void setWindowType(WindowType type);
1086 void setName(
const char *
name);
1094 void setVisibleName(
const char *visibleName);
1101 void setIconName(
const char *
name);
1109 void setVisibleIconName(
const char *
name);
1123 void setDesktop(
int desktop,
bool ignore_viewport =
false);
1130 void setPid(
int pid);
1137 void setHandledIcons(Bool handled);
1144 void setFrameExtents(
NETStrut strut);
1164 void setFrameOverlap(
NETStrut strut);
1185 NETIcon icon(
int width = -1,
int height = -1)
const;
1192 const int* iconSizes()
const;
1201 void setUserTime( Time time );
1206 Time userTime()
const;
1211 void setStartupId(
const char* startup_id );
1216 const char* startupId()
const;
1221 void setOpacity(
unsigned long opacity );
1226 unsigned long opacity()
const;
1231 void setAllowedActions(
unsigned long actions );
1236 unsigned long allowedActions()
const;
1242 Window transientFor()
const;
1247 Window groupLeader()
const;
1253 const char* windowClassClass()
const;
1259 const char* windowClassName()
const;
1264 const char* windowRole()
const;
1269 const char* clientMachine()
const;
1276 const char* activities()
const;
1283 void setBlockingCompositing(
bool active);
1289 bool isBlockingCompositing()
const;
1314 void event( XEvent* event,
unsigned long*
properties,
int properties_size );
1327 unsigned long event(XEvent *event);
1356 virtual void changeState(
unsigned long state,
unsigned long mask) { Q_UNUSED(state); Q_UNUSED(mask); }
1359 void update(
const unsigned long[] );
1360 void updateWMState();
1368 virtual void virtual_hook(
int id,
void* data );
1370 NETWinInfoPrivate *p;
1384 const unsigned long properties[],
int properties_size,
1385 Role role = Client);
1388 Window rootWindow,
unsigned long properties,
1389 Role role = Client);