30#include "tdelibs_export.h"
40struct NETRootInfoPrivate;
41struct NETWinInfoPrivate;
42template <
class Z>
class NETRArray;
58class TDECORE_EXPORT NETRootInfo :
public NET {
65 enum { PROTOCOLS, WINDOW_TYPES, STATES, PROTOCOLS2, ACTIONS,
101 NETRootInfo(Display *display, Window supportWindow,
const char *wmName,
102 const unsigned long properties[],
int properties_size,
103 int screen = -1,
bool doActivate =
true);
111 NETRootInfo(Display *display, Window supportWindow,
const char *wmName,
112 unsigned long properties,
int screen = -1,
bool doActivate =
true) TDE_DEPRECATED;
136 NETRootInfo(Display *display, const
unsigned long properties[],
int properties_size,
137 int screen = -1,
bool doActivate = true);
145 NETRootInfo(Display *display,
unsigned long properties,
int screen = -1,
146 bool doActivate = true);
153 NETRootInfo(const NETRootInfo &rootinfo);
158 virtual ~NETRootInfo();
165 Display *x11Display() const;
172 Window rootWindow() const;
179 Window supportWindow() const;
186 const
char *wmName() const;
193 int screenNumber() const;
201 bool isSupported(
NET::Property property ) const;
206 bool isSupported(
NET::Property2 property ) const;
211 bool isSupported(
NET::WindowType type ) const;
216 bool isSupported(
NET::State state ) const;
222 bool isSupported(
NET::Action action ) const;
235 const
unsigned long* supportedProperties() const;
244 const
unsigned long* passedProperties() const;
261 unsigned long supported() const TDE_DEPRECATED;
270 const Window *clientList() const;
279 int clientListCount() const;
289 const Window *clientListStacking() const;
298 int clientListStackingCount() const;
307 const Window *kdeSystemTrayWindows() const;
316 int kdeSystemTrayWindowsCount() const;
328 NETSize desktopGeometry(
int desktop) const;
337 NETPoint desktopViewport(
int desktop) const;
346 NETRect workArea(
int desktop) const;
355 const
char *desktopName(
int desktop) const;
364 const Window *virtualRoots( ) const;
373 int virtualRootsCount() const;
378 NET::Orientation desktopLayoutOrientation() const;
384 TQSize desktopLayoutColumnsRows() const;
389 NET::DesktopLayoutCorner desktopLayoutCorner() const;
396 int numberOfDesktops() const;
403 int currentDesktop() const;
410 Window activeWindow() const;
430 void setClientList(Window *windows,
unsigned int count);
440 void setClientListStacking(Window *windows,
unsigned int count);
449 void setKDESystemTrayWindows(Window *windows,
unsigned int count);
456 void setCurrentDesktop(
int desktop);
468 void setDesktopGeometry(
int desktop, const
NETSize &geometry);
477 void setDesktopViewport(
int desktop, const
NETPoint &viewport);
484 void setNumberOfDesktops(
int numberOfDesktops);
493 void setDesktopName(
int desktop, const
char *desktopName);
507 void setActiveWindow(Window window,
NET::RequestSource src,
508 Time timestamp, Window active_window);
516 void setActiveWindow(Window window);
525 void setWorkArea(
int desktop, const
NETRect &workArea);
534 void setVirtualRoots(Window *windows,
unsigned int count);
540 void setDesktopLayout(
NET::Orientation orientation,
int columns,
int rows,
541 NET::DesktopLayoutCorner corner);
547 void setShowingDesktop(
bool showing );
552 bool showingDesktop() const;
558 const NETRootInfo &operator=(const NETRootInfo &rootinfo);
567 void closeWindowRequest(Window window);
584 void moveResizeRequest(Window window,
int x_root,
int y_root,
585 Direction direction);
602 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);
613 void restackRequest(Window window, Window above,
int detail);
630 void event( XEvent* event,
unsigned long* properties,
int properties_size );
643 unsigned long event(XEvent *event);
653 virtual
void addClient(Window window) { Q_UNUSED(window); }
661 virtual void removeClient(Window window) { Q_UNUSED(window); }
670 virtual void addSystemTrayWin(Window window) { Q_UNUSED(window); }
679 virtual void removeSystemTrayWin(Window window) { Q_UNUSED(window); }
688 virtual void changeNumberOfDesktops(
int numberOfDesktops) { Q_UNUSED(numberOfDesktops); }
699 virtual void changeDesktopGeometry(
int desktop,
const NETSize &geom) { Q_UNUSED(desktop); Q_UNUSED(geom); }
710 virtual void changeDesktopViewport(
int desktop,
const NETPoint &viewport) { Q_UNUSED(desktop); Q_UNUSED(viewport); }
719 virtual void changeCurrentDesktop(
int desktop) { Q_UNUSED(desktop); }
730 virtual TDE_DEPRECATED
void changeActiveWindow(Window window) { Q_UNUSED(window); }
738 virtual void closeWindow(Window window) { Q_UNUSED(window); }
753 virtual void moveResize(Window window,
int x_root,
int y_root,
754 unsigned long direction) { Q_UNUSED(window); Q_UNUSED(x_root); Q_UNUSED(y_root); Q_UNUSED(direction); }
758 void update(
const unsigned long[] );
760 void setDefaultProperties();
761 void updateSupportedProperties( Atom atom );
765 virtual void virtual_hook(
int id,
void* data );
767 NETRootInfoPrivate *p;
768 friend class NETRootInfo2;
769 friend class NETRootInfo3;
778class TDECORE_EXPORT NETRootInfo2
782 NETRootInfo2(Display *display, Window supportWindow,
const char *wmName,
783 unsigned long properties[],
int properties_size,
784 int screen = -1,
bool doActivate =
true);
788 NETRootInfo2(Display *display,
const unsigned long properties[],
int properties_size,
789 int screen = -1,
bool doActivate =
true);
794 void sendPing( Window window, Time timestamp );
796 friend class NETRootInfo;
803 virtual void gotPing( Window window, Time timestamp ) { Q_UNUSED(window); Q_UNUSED(timestamp); }
815 Time timestamp, Window active_window ) { Q_UNUSED(window); Q_UNUSED(src); Q_UNUSED(timestamp); Q_UNUSED(active_window);}
825 virtual void restackWindow(Window window, Window above,
int detail) { Q_UNUSED(window); Q_UNUSED(above); Q_UNUSED(detail); }
839 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); }
850class TDECORE_EXPORT NETRootInfo3
851 :
public NETRootInfo2
854 NETRootInfo3(Display *display, Window supportWindow,
const char *wmName,
855 unsigned long properties[],
int properties_size,
856 int screen = -1,
bool doActivate =
true);
860 NETRootInfo3(Display *display,
const unsigned long properties[],
int properties_size,
861 int screen = -1,
bool doActivate =
true);
869 void takeActivity( Window window, Time timestamp,
long flags );
871 friend class NETRootInfo;
883 virtual void restackWindow(Window window, RequestSource source,
884 Window above,
int detail, Time timestamp) { Q_UNUSED(window); Q_UNUSED(source); Q_UNUSED(above); Q_UNUSED(detail); Q_UNUSED(timestamp); }
892 virtual void gotTakeActivity(Window window, Time timestamp,
long flags ) { Q_UNUSED(window); Q_UNUSED(timestamp); Q_UNUSED(flags); }
902class TDECORE_EXPORT NETRootInfo4
903 :
public NETRootInfo3
906 NETRootInfo4(Display *display, Window supportWindow,
const char *wmName,
907 unsigned long properties[],
int properties_size,
908 int screen = -1,
bool doActivate =
true);
909 NETRootInfo4(Display *display,
const unsigned long properties[],
int properties_size,
910 int screen = -1,
bool doActivate =
true);
913 friend class NETRootInfo;
921 virtual void changeShowingDesktop(
bool showing) { Q_UNUSED(showing); }
939class TDECORE_EXPORT NETWinInfo :
public NET {
946 enum { PROTOCOLS, PROTOCOLS2,
972 NETWinInfo(Display *display, Window window, Window rootWindow,
973 const unsigned long properties[],
int properties_size,
982 NETWinInfo(Display *display, Window window,
983 Window rootWindow,
unsigned long properties,
991 NETWinInfo(
const NETWinInfo & wininfo);
996 virtual ~NETWinInfo();
1002 const NETWinInfo &operator=(
const NETWinInfo &wintinfo);
1012 bool hasNETSupport()
const;
1021 const unsigned long* passedProperties()
const;
1032 unsigned long properties() const TDE_DEPRECATED;
1047 unsigned long state() const;
1077 WindowType windowType(
unsigned long supported_types ) const;
1086 WindowType windowType() const TDE_DEPRECATED;
1093 const
char *name() const;
1100 const
char *visibleName() const;
1111 const
char *iconName() const;
1122 const
char *visibleIconName() const;
1131 int desktop() const;
1145 Bool handledIcons() const;
1153 Window kdeSystemTrayWinFor() const;
1161 MappingState mappingState() const;
1172 void setIcon(
NETIcon icon, Bool replace = True);
1179 void setIconGeometry(
NETRect geometry);
1206 void setState(
unsigned long state,
unsigned long mask);
1214 void setWindowType(WindowType type);
1221 void setName(const
char *name);
1229 void setVisibleName(const
char *visibleName);
1236 void setIconName(const
char *name);
1244 void setVisibleIconName(const
char *name);
1253 void setDesktop(
int desktop);
1260 void setPid(
int pid);
1267 void setHandledIcons(Bool handled);
1274 void setKDESystemTrayWinFor(Window window);
1282 void setFrameExtents(
NETStrut strut);
1290 void setKDEFrameStrut(
NETStrut strut);
1303 NETIcon icon(
int width = -1,
int height = -1) const;
1313 void setUserTime( Time time );
1319 Time userTime() const;
1325 void setStartupId( const
char* startup_id );
1331 const
char* startupId() const;
1337 void setAllowedActions(
unsigned long actions );
1343 unsigned long allowedActions() const;
1350 Window transientFor() const;
1356 Window groupLeader() const;
1363 const
char* windowClassClass() const;
1370 const
char* windowClassName() const;
1376 const
char* windowRole() const;
1382 const
char* clientMachine() const;
1409 void event( XEvent* event,
unsigned long* properties,
int properties_size );
1422 unsigned long event(XEvent *event);
1430 static const
int OnAllDesktops;
1441 virtual
void changeDesktop(
int desktop) { Q_UNUSED(desktop); }
1452 virtual void changeState(
unsigned long state,
unsigned long mask) { Q_UNUSED(state); Q_UNUSED(mask); }
1455 void update(
const unsigned long[] );
1456 void updateWMState();
1457 void setIconInternal(NETRArray<NETIcon>& icons,
int& icon_count, Atom property,
NETIcon icon, Bool replace);
1458 NETIcon iconInternal(NETRArray<NETIcon>& icons,
int icon_count,
int width,
int height)
const;
1462 virtual void virtual_hook(
int id,
void* data );
1464 NETWinInfoPrivate *p;
RequestSource
Source of the request.
Partial strut class for NET classes.
Simple icon class for NET classes.
Simple point class for NET classes.
Simple rectangle class for NET classes.
Simple size class for NET classes.