X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=wrap%2Fob.i;h=b6c9461e7cd23adab3edcf7eb1b6ebb9d54a4edd;hb=055b459cdf8e8f15d17cb3366cfde31406fa6223;hp=b4c94622c7f93d7058449b0e30b46d88e9f4bb46;hpb=7c8c9e998ffc3a9b22e15feeffe77823142ce531;p=chaz%2Fopenbox diff --git a/wrap/ob.i b/wrap/ob.i index b4c94622..b6c9461e 100644 --- a/wrap/ob.i +++ b/wrap/ob.i @@ -3,73 +3,11 @@ %module ob %{ -#ifdef HAVE_CONFIG_H -# include "../config.h" -#endif - -#include "frame.hh" -#include "openbox.hh" -#include "screen.hh" -#include "client.hh" -#include "bindings.hh" -#include "actions.hh" -#include "python.hh" -#include "otk/otk.hh" -%} - -%include "stl.i" -//%include std_list.i -//%template(ClientList) std::list; -%include "callback.i" - -%immutable ob::openbox; -/* -%ignore ob::openbox; -%inline %{ - ob::Openbox *Openbox_instance() { return ob::openbox; } -%}; -*/ - -%ignore ob::Screen::clients; -%{ - #include -%} -%extend ob::Screen { - Client *client(int i) { - if (i < 0 || i >= (int)self->clients.size()) - return NULL; - ob::Client::List::iterator it = self->clients.begin(); - std::advance(it,i); - return *it; - } - int clientCount() const { - return (int) self->clients.size(); - } -}; - -%import "otk.i" - -%import "widgetbase.hh" -%import "actions.hh" - -%include "openbox.hh" -%include "screen.hh" -%include "client.hh" -%include "frame.hh" -%include "python.hh" - -// for Window etc -%import "X11/X.h" - -%inline %{ -void set_reset_key(const std::string &key) -{ - ob::openbox->bindings()->setResetKey(key); -} - +#include +#include "otk/display.hh" void send_client_msg(Window target, Atom type, Window about, - long data, long data1, long data2, - long data3, long data4) + long data=0, long data1=0, long data2=0, + long data3=0, long data4=0) { XEvent e; e.xclient.type = ClientMessage; @@ -87,7 +25,31 @@ void send_client_msg(Window target, Atom type, Window about, &e); } -void execute(const std::string &bin, int screen) +%} + +%include "ob_openbox.i" +%include "ob_screen.i" +%include "ob_client.i" +%include "ob_frame.i" +%include "ob_python.i" +%include "ob_callback.i" + +// for Window etc +%import "X11/X.h" + +%inline %{ +#include +#include "bindings.hh" +#include "otk/display.hh" +#include "otk/screeninfo.hh" +#include "otk/util.hh" + +void set_reset_key(const std::string &key) +{ + ob::openbox->bindings()->setResetKey(key); +} + +void execute(const std::string &bin, int screen=0) { if (screen >= ScreenCount(**otk::display)) screen = 0;