1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
8 #include "otk/display.hh"
9 #include "otk/property.hh"
12 %include "ob_client.i"
14 %include "otk_ustring.i"
16 %include "std_vector.i"
18 %typemap(python,out) const otk::Property::StringVect& {
19 otk::Property::StringVect *v = $1;
20 unsigned int s = v->size();
21 PyObject *l = PyList_New(s);
23 otk::Property::StringVect::const_iterator it = v->begin(), end = v->end();
24 for (unsigned int i = 0; i < s; ++i, ++it) {
25 PyObject *pdata = PyString_FromString(it->c_str());
26 PyList_SET_ITEM(l, i, pdata);
31 %typemap(python,out) std::list<ob::Client*> {
32 unsigned int s = $1.size();
33 PyObject *l = PyList_New(s);
35 std::list<ob::Client*>::const_iterator it = $1.begin(), end = $1.end();
36 for (unsigned int i = 0; i < s; ++i, ++it) {
37 PyObject *pdata = SWIG_NewPointerObj((void*)*it,SWIGTYPE_p_ob__Client,0);
38 PyList_SET_ITEM(l, i, pdata);
43 %typemap(python,out) const std::vector<otk::Rect>& {
44 std::vector<otk::Rect> *v = $1;
45 unsigned int s = v->size();
46 PyObject *l = PyList_New(s);
48 std::vector<otk::Rect>::const_iterator it = v->begin(), end = v->end();
49 for (unsigned int i = 0; i < s; ++i, ++it) {
50 PyObject *pdata = SWIG_NewPointerObj((void*)&(*it),SWIGTYPE_p_otk__Rect,0);
51 PyList_SET_ITEM(l, i, pdata);
59 void showDesktop(bool show) {
60 Window root = RootWindow(**otk::display, self->number());
61 send_client_msg(root, otk::Property::atoms.net_showing_desktop,
65 void changeDesktop(unsigned int desktop) {
66 Window root = RootWindow(**otk::display, self->number());
67 send_client_msg(root, otk::Property::atoms.net_current_desktop,
71 const otk::Size& size() {
72 return otk::display->screenInfo(self->number())->size();
75 const std::vector<otk::Rect> &xineramaAreas() {
76 return otk::display->screenInfo(self->number())->xineramaAreas();
80 return otk::display->screenInfo(self->number())->rootWindow();
84 %immutable Screen::clients;
86 %ignore Screen::event_mask;
87 %ignore Screen::Screen(int);
88 %ignore Screen::~Screen();
89 %ignore Screen::focuswindow() const;
90 %ignore Screen::managed() const;
91 %rename(ignored_showDesktop) Screen::showDesktop(bool show);
92 %ignore Screen::ignored_showDesktop(bool show);
93 %ignore Screen::updateStruts();
94 %ignore Screen::manageExisting();
95 %ignore Screen::manageWindow(Window);
96 %ignore Screen::unmanageWindow(Client*);
97 %ignore Screen::raiseWindow(Client*);
98 %ignore Screen::lowerWindow(Client*);
99 %ignore Screen::installColormap(bool) const;
100 %ignore Screen::propertyHandler(const XPropertyEvent &);
101 %ignore Screen::clientMessageHandler(const XClientMessageEvent &);
102 %ignore Screen::mapRequestHandler(const XMapRequestEvent &);