1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
7 # include "../config.h"
14 #include "bindings.hh"
22 //%template(ClientList) std::list<Client*>;
25 %immutable ob::openbox;
29 ob::Openbox *Openbox_instance() { return ob::openbox; }
33 %ignore ob::Screen::clients;
38 Client *client(int i) {
39 if (i < 0 || i >= (int)self->clients.size())
41 ob::Client::List::iterator it = self->clients.begin();
45 int clientCount() const {
46 return (int) self->clients.size();
64 void set_reset_key(const std::string &key)
66 ob::openbox->bindings()->setResetKey(key);
69 void send_client_msg(Window target, Atom type, Window about,
70 long data=0, long data1=0, long data2=0,
71 long data3=0, long data4=0)
74 e.xclient.type = ClientMessage;
75 e.xclient.format = 32;
76 e.xclient.message_type = type;
77 e.xclient.window = about;
78 e.xclient.data.l[0] = data;
79 e.xclient.data.l[1] = data1;
80 e.xclient.data.l[2] = data2;
81 e.xclient.data.l[3] = data3;
82 e.xclient.data.l[4] = data4;
84 XSendEvent(**otk::display, target, false,
85 SubstructureRedirectMask | SubstructureNotifyMask,
89 void execute(const std::string &bin, int screen=0)
91 if (screen >= ScreenCount(**otk::display))
93 otk::bexec(bin, otk::display->screenInfo(screen)->displayString());
100 openbox = cvar.openbox;