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();
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;