1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
12 #include "bindings.hh"
20 //%template(ClientList) std::list<Client*>;
23 %immutable ob::openbox;
27 ob::Openbox *Openbox_instance() { return ob::openbox; }
31 %ignore ob::Screen::clients;
36 Client *client(int i) {
37 if (i < 0 || i >= (int)self->clients.size())
39 ob::Client::List::iterator it = self->clients.begin();
43 int clientCount() const {
44 return (int) self->clients.size();
48 // do this through events
49 %ignore ob::Screen::showDesktop(bool);
51 %ignore ob::Screen::managed;
52 %ignore ob::Screen::config;
68 void set_reset_key(const std::string &key)
70 ob::openbox->bindings()->setResetKey(key);
73 void send_client_msg(Window target, Atom type, Window about,
74 long data=0, long data1=0, long data2=0,
75 long data3=0, long data4=0)
78 e.xclient.type = ClientMessage;
79 e.xclient.format = 32;
80 e.xclient.message_type = type;
81 e.xclient.window = about;
82 e.xclient.data.l[0] = data;
83 e.xclient.data.l[1] = data1;
84 e.xclient.data.l[2] = data2;
85 e.xclient.data.l[3] = data3;
86 e.xclient.data.l[4] = data4;
88 XSendEvent(**otk::display, target, false,
89 SubstructureRedirectMask | SubstructureNotifyMask,
93 void execute(const std::string &bin, int screen=0)
95 if (screen >= ScreenCount(**otk::display))
97 otk::bexec(bin, otk::display->screenInfo(screen)->displayString());
104 openbox = cvar.openbox;