• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kde-workspace API Reference
  • KDE Home
  • Contact Us
 

KWin

  • kde-4.x
  • kde-workspace
  • kwin
netinfo.h
Go to the documentation of this file.
1 /********************************************************************
2  KWin - the KDE window manager
3  This file is part of the KDE project.
4 
5 Copyright (C) 1999, 2000 Matthias Ettrich <[email protected]>
6 Copyright (C) 2003 Lubos Lunak <[email protected]>
7 Copyright (C) 2009 Lucas Murray <[email protected]>
8 Copyright (C) 2013 Martin Gräßlin <[email protected]>
9 
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
14 
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19 
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 *********************************************************************/
23 #ifndef KWIN_NETINFO_H
24 #define KWIN_NETINFO_H
25 
26 #include <NETWM>
27 
28 #include <xcb/xcb.h>
29 
30 namespace KWin
31 {
32 
33 class Client;
34 
38 class RootInfo : public NETRootInfo
39 {
40 private:
41  typedef KWin::Client Client; // Because of NET::Client
42 
43 public:
44  static RootInfo *create();
45  static void destroy();
46 
47 protected:
48  virtual void changeNumberOfDesktops(int n) override;
49  virtual void changeCurrentDesktop(int d) override;
50  virtual void changeActiveWindow(xcb_window_t w, NET::RequestSource src, xcb_timestamp_t timestamp, xcb_window_t active_window) override;
51  virtual void closeWindow(xcb_window_t w) override;
52  virtual void moveResize(xcb_window_t w, int x_root, int y_root, unsigned long direction) override;
53  virtual void moveResizeWindow(xcb_window_t w, int flags, int x, int y, int width, int height) override;
54  virtual void gotPing(xcb_window_t w, xcb_timestamp_t timestamp) override;
55  virtual void restackWindow(xcb_window_t w, RequestSource source, xcb_window_t above, int detail, xcb_timestamp_t timestamp) override;
56  virtual void changeShowingDesktop(bool showing) override;
57 
58 private:
59  RootInfo(xcb_window_t w, const char* name, NET::Properties properties, NET::WindowTypes types,
60  NET::States states, NET::Properties2 properties2, NET::Actions actions, int scr = -1);
61  static RootInfo *s_self;
62  friend RootInfo *rootInfo();
63 };
64 
65 inline RootInfo *rootInfo()
66 {
67  return RootInfo::s_self;
68 }
69 
73 class WinInfo : public NETWinInfo
74 {
75 private:
76  typedef KWin::Client Client; // Because of NET::Client
77 
78 public:
79  WinInfo(Client* c, xcb_window_t window,
80  xcb_window_t rwin, NET::Properties properties, NET::Properties2 properties2);
81  virtual void changeDesktop(int desktop) override;
82  virtual void changeFullscreenMonitors(NETFullscreenMonitors topology) override;
83  virtual void changeState(NET::States state, NET::States mask) override;
84  void disable();
85 
86 private:
87  Client * m_client;
88 };
89 
90 } // KWin
91 
92 #endif
KWin::RootInfo::gotPing
virtual void gotPing(xcb_window_t w, xcb_timestamp_t timestamp) override
Definition: netinfo.cpp:219
KWin::RootInfo::rootInfo
friend RootInfo * rootInfo()
Definition: netinfo.h:65
KWin::WinInfo::WinInfo
WinInfo(Client *c, xcb_window_t window, xcb_window_t rwin, NET::Properties properties, NET::Properties2 properties2)
Definition: netinfo.cpp:234
KWin::WinInfo::changeFullscreenMonitors
virtual void changeFullscreenMonitors(NETFullscreenMonitors topology) override
Definition: netinfo.cpp:245
KWin::RootInfo::changeShowingDesktop
virtual void changeShowingDesktop(bool showing) override
Definition: netinfo.cpp:225
KWin::RootInfo::changeActiveWindow
virtual void changeActiveWindow(xcb_window_t w, NET::RequestSource src, xcb_timestamp_t timestamp, xcb_window_t active_window) override
Definition: netinfo.cpp:157
KWin::WinInfo::changeDesktop
virtual void changeDesktop(int desktop) override
Definition: netinfo.cpp:240
NETRootInfo
KWin::RootInfo::restackWindow
virtual void restackWindow(xcb_window_t w, RequestSource source, xcb_window_t above, int detail, xcb_timestamp_t timestamp) override
Definition: netinfo.cpp:185
KWin::WinInfo::changeState
virtual void changeState(NET::States state, NET::States mask) override
Definition: netinfo.cpp:250
KWin::RootInfo::changeCurrentDesktop
virtual void changeCurrentDesktop(int d) override
Definition: netinfo.cpp:152
KWin::RootInfo::create
static RootInfo * create()
Definition: netinfo.cpp:40
KWin::WinInfo::disable
void disable()
Definition: netinfo.cpp:284
KWin::RootInfo::moveResize
virtual void moveResize(xcb_window_t w, int x_root, int y_root, unsigned long direction) override
Definition: netinfo.cpp:203
KWin::rootInfo
RootInfo * rootInfo()
Definition: netinfo.h:65
KWin::RootInfo::moveResizeWindow
virtual void moveResizeWindow(xcb_window_t w, int flags, int x, int y, int width, int height) override
Definition: netinfo.cpp:212
KWin::RootInfo::changeNumberOfDesktops
virtual void changeNumberOfDesktops(int n) override
Definition: netinfo.cpp:147
xcb_window_t
KWin::RootInfo::destroy
static void destroy()
Definition: netinfo.cpp:132
NETWinInfo
KWin::RootInfo
NET WM Protocol handler class.
Definition: netinfo.h:38
KWin::WinInfo
NET WM Protocol handler class.
Definition: netinfo.h:73
KWin::Client
The Client class encapsulates a window decoration frame.
Definition: client.h:71
KWin::RootInfo::closeWindow
virtual void closeWindow(xcb_window_t w) override
Definition: netinfo.cpp:196
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Mon Dec 9 2019 01:34:30 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KWin

Skip menu "KWin"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kde-workspace API Reference

Skip menu "kde-workspace API Reference"
  • KWin
  •   KWin Decoration Library
  •   KWin Effects Library
  • Plasma
  • Plasma
  •   Applets
  •   Engines
  •   libkworkspace
  •   libtaskmanager
  • System Settings
  •   SystemSettingsView

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal