/usr/share/sip/PyKDE4/kdeui/kwindowsystem.sip is in python-kde4-dev 4:4.8.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | //
// Copyright 2008 Jim Bublitz <jbublitz@nwinternet.com>
// Earlier copyrights 1998 - 2007 Jim Bublitz also apply
// Generated by twine
// This file is part of PyKDE4.
// PyKDE4 is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of
// the License, or (at your option) any later version.
// PyKDE4 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
class KWindowSystem : QObject, NET
{
%TypeHeaderCode
#include <kwindowsystem.h>
%End
public:
static KWindowSystem* self ();
static const QList<WId>& windows ();
static bool hasWId (WId id);
static KWindowInfo windowInfo (WId win, unsigned long properties, unsigned long properties2 = 0);
static QList<WId> stackingOrder ();
static WId activeWindow ();
static void activateWindow (WId win, long time = 0);
static void forceActiveWindow (WId win, long time = 0);
static void demandAttention (WId win, bool set = 1);
static bool compositingActive ();
static int currentDesktop ();
static int numberOfDesktops ();
static void setCurrentDesktop (int desktop);
static void setOnAllDesktops (WId win, bool b);
static void setOnDesktop (WId win, int desktop);
static void setMainWindow (QWidget* subwindow, WId mainwindow);
static WId transientFor (WId window);
static WId groupLeader (WId window);
static QPixmap icon (WId win, int width = -1, int height = -1, bool scale = 0);
enum IconSource
{
NETWM,
WMHints,
ClassHint,
XApp
};
static QPixmap icon (WId win, int width, int height, bool scale, int flags);
static void setIcons (WId win, const QPixmap& icon, const QPixmap& miniIcon);
static void setType (WId win, NET::WindowType windowType);
static void setState (WId win, unsigned long state);
static void clearState (WId win, unsigned long state);
static void minimizeWindow (WId win, bool animation = 1);
static void unminimizeWindow (WId win, bool animation = 1);
static void raiseWindow (WId win);
static void lowerWindow (WId win);
static bool icccmCompliantMappingState ();
static QRect workArea (int desktop = -1);
static QRect workArea (const QList<WId>& excludes, int desktop = -1);
static QString desktopName (int desktop);
static void setDesktopName (int desktop, const QString& name);
static bool showingDesktop ();
static void setUserTime (WId win, long time);
static void setExtendedStrut (WId win, int left_width, int left_start, int left_end, int right_width, int right_start, int right_end, int top_width, int top_start, int top_end, int bottom_width, int bottom_start, int bottom_end);
static void setStrut (WId win, int left, int right, int top, int bottom);
static bool allowedActionsSupported ();
static QString readNameProperty (WId window, unsigned long atom);
static void doNotManage (const QString& title);
static bool mapViewport ();
static int viewportToDesktop (const QPoint& pos);
static int viewportWindowToDesktop (const QRect& r);
static QPoint desktopToViewport (int desktop, bool absolute);
static QPoint constrainViewportRelativePosition (const QPoint& pos);
signals:
void currentDesktopChanged (int desktop);
void windowAdded (WId id);
void windowRemoved (WId id);
void activeWindowChanged (WId id);
void desktopNamesChanged ();
void numberOfDesktopsChanged (int num);
void workAreaChanged ();
void strutChanged ();
void stackingOrderChanged ();
//ig void windowChanged (WId id, const unsigned long* properties /Out/);
void windowChanged (WId id, unsigned int properties);
void windowChanged (WId id);
void showingDesktopChanged (bool showing);
protected:
//force
virtual void connectNotify (SIP_SIGNAL);
//end
private:
KWindowSystem ();
public:
static void allowExternalProcessWindowActivation (int pid = -1);
protected:
//ig virtual void connectNotify (const char* signal);
public:
static void setBlockingCompositing (WId window, bool active);
};
// KWindowSystem
%MappedType QList<WId>
{
%TypeHeaderCode
#include <qlist.h>
%End
%ConvertFromTypeCode
// Create the list.
PyObject *l;
if ((l = PyList_New(sipCpp->size())) == NULL)
return NULL;
// Set the list elements.
for (int i = 0; i < sipCpp->size(); ++i) {
PyObject *pobj;
#if PY_MAJOR_VERSION >= 3
if ((pobj = PyLong_FromLong ((long)sipCpp->value(i))) == NULL) {
#else
if ((pobj = PyInt_FromLong ((long)sipCpp->value(i))) == NULL) {
#endif
Py_DECREF(l);
return NULL;
}
PyList_SET_ITEM(l, i, pobj);
}
return l;
%End
%ConvertToTypeCode
// Check the type if that is all that is required.
if (sipIsErr == NULL)
return PyList_Check(sipPy);
QList<WId> *ql = new QList<WId>;
for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) {
#if PY_MAJOR_VERSION >= 3
ql->append((WId)PyLong_AsLong(PyList_GET_ITEM(sipPy, i)));
#else
ql->append((WId)PyInt_AS_LONG (PyList_GET_ITEM(sipPy, i)));
#endif
}
*sipCppPtr = ql;
return sipGetState(sipTransferObj);
%End
};
|