1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
12 #include "bindings.hh"
21 %immutable ob::openbox;
25 ob::Openbox *Openbox_instance() { return ob::openbox; }
29 %typemap(python,out) std::list<ob::Client*> {
30 unsigned int s = $1.size();
31 PyObject *l = PyList_New(s);
33 std::list<ob::Client*>::const_iterator it = $1.begin(), end = $1.end();
34 for (unsigned int i = 0; i < s; ++i, ++it) {
35 PyObject *pdata = SWIG_NewPointerObj((void *) *it,
36 SWIGTYPE_p_ob__Client, 0);
37 PyList_SET_ITEM(l, i, pdata);
42 // do this through events
43 %ignore ob::Screen::showDesktop(bool);
45 %ignore ob::Screen::managed;
46 %ignore ob::Screen::config;
62 void set_reset_key(const std::string &key)
64 ob::openbox->bindings()->setResetKey(key);
67 void send_client_msg(Window target, Atom type, Window about,
68 long data=0, long data1=0, long data2=0,
69 long data3=0, long data4=0)
72 e.xclient.type = ClientMessage;
73 e.xclient.format = 32;
74 e.xclient.message_type = type;
75 e.xclient.window = about;
76 e.xclient.data.l[0] = data;
77 e.xclient.data.l[1] = data1;
78 e.xclient.data.l[2] = data2;
79 e.xclient.data.l[3] = data3;
80 e.xclient.data.l[4] = data4;
82 XSendEvent(**otk::display, target, false,
83 SubstructureRedirectMask | SubstructureNotifyMask,
87 void execute(const std::string &bin, int screen=0)
89 if (screen >= ScreenCount(**otk::display))
91 otk::bexec(bin, otk::display->screenInfo(screen)->displayString());
98 openbox = cvar.openbox;