]> Dogcows Code - chaz/openbox/blob - wrap/ob_screen.i
remove some include/import we dont need.
[chaz/openbox] / wrap / ob_screen.i
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2
3 %module ob_screen
4
5 %{
6 #include "config.h"
7 #include "screen.hh"
8 #include "otk/display.hh"
9 #include "otk/property.hh"
10 %}
11
12 %include "ob_client.i"
13 %include "otk.i" // XXX otk_rect.i!!!
14 %include "ustring.i"
15
16 %typemap(python,out) std::list<ob::Client*> {
17 unsigned int s = $1.size();
18 PyObject *l = PyList_New(s);
19
20 std::list<ob::Client*>::const_iterator it = $1.begin(), end = $1.end();
21 for (unsigned int i = 0; i < s; ++i, ++it) {
22 PyObject *pdata = SWIG_NewPointerObj((void*)*it,SWIGTYPE_p_ob__Client,0);
23 PyList_SET_ITEM(l, i, pdata);
24 }
25 $result = l;
26 }
27
28 %typemap(python,out) const otk::Property::StringVect& {
29 otk::Property::StringVect *v = $1;
30 unsigned int s = v->size();
31 PyObject *l = PyList_New(s);
32
33 otk::Property::StringVect::const_iterator it = v->begin(), end = v->end();
34 for (unsigned int i = 0; i < s; ++i, ++it) {
35 PyObject *pdata = PyString_FromString(it->c_str());
36 PyList_SET_ITEM(l, i, pdata);
37 }
38 $result = l;
39 }
40
41 namespace ob {
42
43 %extend Screen {
44 void showDesktop(bool show) {
45 Window root = RootWindow(**otk::display, self->number());
46 send_client_msg(root, otk::Property::atoms.net_showing_desktop,
47 root, show);
48 }
49
50 void changeDesktop(unsigned int desktop) {
51 Window root = RootWindow(**otk::display, self->number());
52 send_client_msg(root, otk::Property::atoms.net_current_desktop,
53 root, desktop);
54 }
55 }
56
57 %immutable Screen::clients;
58
59 %ignore Screen::event_mask;
60 %ignore Screen::Screen(int);
61 %ignore Screen::~Screen();
62 %ignore Screen::focuswindow() const;
63 %ignore Screen::managed() const;
64 %ignore Screen::config();
65 %rename(ignored_showDesktop) Screen::showDesktop(bool show);
66 %ignore Screen::ignored_showDesktop(bool show);
67 %ignore Screen::updateStruts();
68 %ignore Screen::manageExisting();
69 %ignore Screen::manageWindow(Window);
70 %ignore Screen::unmanageWindow(Client*);
71 %ignore Screen::raiseWindow(Client*);
72 %ignore Screen::lowerWindow(Client*);
73 %ignore Screen::installColormap(bool) const;
74 %ignore Screen::propertyHandler(const XPropertyEvent &);
75 %ignore Screen::clientMessageHandler(const XClientMessageEvent &);
76 %ignore Screen::mapRequestHandler(const XMapRequestEvent &);
77
78 }
79
80 %include "screen.hh"
This page took 0.034605 seconds and 4 git commands to generate.