kde-playground/pykde4/sip/kdeui/netwm.sip

287 lines
13 KiB
Text

//
// 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/>.
%ModuleHeaderCode
#include <netwm.h>
%End
class NETRootInfo : NET
{
%TypeHeaderCode
#include <netwm.h>
%End
public:
enum
{
PROTOCOLS,
WINDOW_TYPES,
STATES,
PROTOCOLS2,
ACTIONS,
PROPERTIES_SIZE
};
//force
NETRootInfo (Display* display, Window supportWindow, const char* wmName, SIP_PYLIST properties, int screen = -1, bool doACtivate = 1) [(Display*, Window, const char*, const unsigned long*, int, int = -1, bool = 1)];
%MethodCode
int count = PyList_Size (a3);
unsigned long *list = new unsigned long [count];
for (int i = 0; i < count; i++) {
#if PY_MAJOR_VERSION >= 3
list [i] = (unsigned long)PyLong_AsLong (PyList_GET_ITEM (a3, i));
#else
list [i] = (unsigned long)PyInt_AS_LONG (PyList_GET_ITEM (a3, i));
#endif
}
Py_BEGIN_ALLOW_THREADS
sipCpp = new sipNETRootInfo (a0, a1, a2, list, count, a4, a5);
Py_END_ALLOW_THREADS
delete list;
%End
NETRootInfo (Display* display, SIP_PYLIST properties, int screen = -1, bool doActivate = 1) [(Display*, const unsigned long*, int, int = -1, bool = 1)];
%MethodCode
int count = PyList_Size (a1);
unsigned long *list = new unsigned long [count];
for (int i = 0; i < count; i++)
#if PY_MAJOR_VERSION >= 3
list [i] = (unsigned long)PyLong_AsLong(PyList_GET_ITEM (a1, i));
#else
list [i] = (unsigned long)PyInt_AS_LONG (PyList_GET_ITEM (a1, i));
#endif
Py_BEGIN_ALLOW_THREADS
sipCpp = new sipNETRootInfo (a0, list, count, a2, a3);
Py_END_ALLOW_THREADS
delete list;
%End
//end
NETRootInfo (Display* display, unsigned long properties, int screen = -1, bool doActivate = 1);
NETRootInfo (const NETRootInfo& rootinfo);
Display* x11Display () const;
Window rootWindow () const;
Window supportWindow () const;
const char* wmName () const;
int screenNumber () const;
bool isSupported (NET::Property property) const;
bool isSupported (NET::Property2 property) const;
bool isSupported (NET::WindowType type) const;
bool isSupported (NET::State state) const;
bool isSupported (NET::Action action) const;
//ig const unsigned long* supportedProperties () const;
//ig const unsigned long* passedProperties () const;
//ig const Window* clientList () const;
int clientListCount () const;
//ig const Window* clientListStacking () const;
int clientListStackingCount () const;
NETSize desktopGeometry (int desktop) const;
NETPoint desktopViewport (int desktop) const;
NETRect workArea (int desktop) const;
const char* desktopName (int desktop) const;
//ig const Window* virtualRoots () const;
int virtualRootsCount () const;
NET::Orientation desktopLayoutOrientation () const;
QSize desktopLayoutColumnsRows () const;
NET::DesktopLayoutCorner desktopLayoutCorner () const;
int numberOfDesktops (bool ignore_viewport = 0) const;
int currentDesktop (bool ignore_viewport = 0) const;
Window activeWindow () const;
void activate ();
void setClientList (const Window* windows, unsigned int count);
void setClientListStacking (const Window* windows, unsigned int count);
void setCurrentDesktop (int desktop, bool ignore_viewport = 0);
void setDesktopGeometry (int desktop, const NETSize& geometry);
void setDesktopViewport (int desktop, const NETPoint& viewport);
void setNumberOfDesktops (int numberOfDesktops);
void setDesktopName (int desktop, const char* desktopName);
void setActiveWindow (Window window, NET::RequestSource src, Time timestamp, Window active_window);
void setActiveWindow (Window window);
void setWorkArea (int desktop, const NETRect& workArea);
void setVirtualRoots (const Window* windows, unsigned int count);
void setDesktopLayout (NET::Orientation orientation, int columns, int rows, NET::DesktopLayoutCorner corner);
void setShowingDesktop (bool showing);
bool showingDesktop () const;
void closeWindowRequest (Window window);
void moveResizeRequest (Window window, int x_root, int y_root, NET::Direction direction);
void moveResizeWindowRequest (Window window, int flags, int x, int y, int width, int height);
void restackRequest (Window window, NET::RequestSource source, Window above, int detail, Time timestamp);
void sendPing (Window window, Time timestamp);
void takeActivity (Window window, Time timestamp, long flags);
//ig void event (XEvent* event, unsigned long* properties, int properties_size);
//ig unsigned long event (XEvent* event);
protected:
virtual void addClient (Window window);
virtual void removeClient (Window window);
virtual void changeNumberOfDesktops (int numberOfDesktops);
virtual void changeDesktopGeometry (int desktop, const NETSize& geom);
virtual void changeDesktopViewport (int desktop, const NETPoint& viewport);
virtual void changeCurrentDesktop (int desktop);
virtual void closeWindow (Window window);
virtual void moveResize (Window window, int x_root, int y_root, unsigned long direction);
virtual void gotPing (Window window, Time timestamp);
virtual void changeActiveWindow (Window window, NET::RequestSource src, Time timestamp, Window active_window);
virtual void moveResizeWindow (Window window, int flags, int x, int y, int width, int height);
virtual void restackWindow (Window window, NET::RequestSource source, Window above, int detail, Time timestamp);
virtual void gotTakeActivity (Window window, Time timestamp, long flags);
virtual void changeShowingDesktop (bool showing);
//ig virtual void virtual_hook (int id, void* data);
public:
//ig NETRootInfo (Display* display, Window supportWindow, const char* wmName, const unsigned long properties [], int properties_size, int screen = -1, bool doActivate = 1);
//ig NETRootInfo (Display* display, const unsigned long properties [], int properties_size, int screen = -1, bool doActivate = 1);
~NETRootInfo ();
void setSupported (NET::Property property, bool on = 1);
void setSupported (NET::Property2 property, bool on = 1);
void setSupported (NET::WindowType property, bool on = 1);
void setSupported (NET::State property, bool on = 1);
void setSupported (NET::Action property, bool on = 1);
};
// NETRootInfo
class NETWinInfo : NET
{
%TypeHeaderCode
#include <netwm.h>
%End
public:
enum
{
PROTOCOLS,
PROTOCOLS2,
PROPERTIES_SIZE
};
//force
NETWinInfo (Display* display, Window window, Window rootWindow, SIP_PYLIST properties, NET::Role role = NET::Client) [(Display*, Window, Window, const unsigned long*, int, Role = Client)];
%MethodCode
int count = PyList_Size (a3);
unsigned long *list = new unsigned long [count];
for (int i = 0; i < count; i++) {
#if PY_MAJOR_VERSION >= 3
list [i] = (unsigned long)PyLong_AsLong (PyList_GET_ITEM (a3, i));
#else
list [i] = (unsigned long)PyInt_AS_LONG (PyList_GET_ITEM (a3, i));
#endif
}
Py_BEGIN_ALLOW_THREADS
sipCpp = new sipNETWinInfo (a0, a1, a2, list, count, a4);
Py_END_ALLOW_THREADS
delete list;
%End
//end
NETWinInfo (Display* display, Window window, Window rootWindow, unsigned long properties, NET::Role role = NET::Client);
NETWinInfo (const NETWinInfo& wininfo);
bool hasNETSupport () const;
//ig const unsigned long* passedProperties () const;
NETRect iconGeometry () const;
unsigned long state () const;
NETExtendedStrut extendedStrut () const;
NETStrut strut () const;
NET::WindowType windowType (unsigned long supported_types) const;
bool hasWindowType () const;
const char* name () const;
const char* visibleName () const;
const char* iconName () const;
const char* visibleIconName () const;
int desktop (bool ignore_viewport = 0) const;
int pid () const;
Bool handledIcons () const;
NET::MappingState mappingState () const;
//ig void setIcon (NETIcon icon, Bool replace = True);
void setIconGeometry (NETRect geometry);
void setExtendedStrut (const NETExtendedStrut& extended_strut);
void setStrut (NETStrut strut);
void setState (unsigned long state, unsigned long mask);
void setWindowType (NET::WindowType type);
void setName (const char* name);
void setVisibleName (const char* visibleName);
void setIconName (const char* name);
void setVisibleIconName (const char* name);
void setDesktop (int desktop, bool ignore_viewport = 0);
void setPid (int pid);
void setHandledIcons (Bool handled);
void setFrameExtents (NETStrut strut);
//ig NETStrut frameExtents () const;
//ig NETIcon icon (int width = -1, int height = -1) const;
//ig const int* iconSizes () const;
void setUserTime (Time time);
Time userTime () const;
void setStartupId (const char* startup_id);
const char* startupId () const;
void setOpacity (unsigned long opacity);
unsigned long opacity () const;
void setAllowedActions (unsigned long actions);
unsigned long allowedActions () const;
Window transientFor () const;
Window groupLeader () const;
const char* windowClassClass () const;
const char* windowClassName () const;
const char* windowRole () const;
const char* clientMachine () const;
void kdeGeometry (NETRect& frame, NETRect& window);
//ig void event (XEvent* event, unsigned long* properties, int properties_size);
//ig unsigned long event (XEvent* event);
//ig const int OnAllDesktops;
protected:
virtual void changeDesktop (int desktop);
virtual void changeState (unsigned long state, unsigned long mask);
//ig virtual void virtual_hook (int id, void* data);
public:
//force
static const int OnAllDesktops;
//end
//ig NETWinInfo (Display* display, Window window, Window rootWindow, const unsigned long properties [], int properties_size, NET::Role role = NET::Role::Client);
~NETWinInfo ();
void setFrameOverlap (NETStrut strut);
NETStrut frameOverlap () const;
void setBlockingCompositing (bool active);
bool isBlockingCompositing () const;
};
// NETWinInfo
//ig class NETWinInfo2;
//force
typedef ulong Time;
//end