X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=src%2Fopenbox.i;h=66ec8ee6b4dc0912280c4d280aa535a5d880e540;hb=b99508df011eaf8a264bf5725ac8849f0782ec7b;hp=edc29ae82303c0081fefc2a62a8b211c2b340b4f;hpb=77ab46d1e35d48e73c201e6de88b26f48bb06425;p=chaz%2Fopenbox diff --git a/src/openbox.i b/src/openbox.i index edc29ae8..66ec8ee6 100644 --- a/src/openbox.i +++ b/src/openbox.i @@ -7,6 +7,7 @@ # include "../config.h" #endif +#include "frame.hh" #include "openbox.hh" #include "screen.hh" #include "client.hh" @@ -20,9 +21,9 @@ //%include std_list.i //%template(ClientList) std::list; -%ignore ob::Openbox::instance; +%ignore ob::openbox; %inline %{ - ob::Openbox *Openbox_instance() { return ob::Openbox::instance; } + ob::Openbox *Openbox_instance() { return ob::openbox; } %}; %{ @@ -90,13 +91,15 @@ void python_callback(PyObject *func, KeyData *data) } %} +#ignore ob::openbox; + %ignore ob::Screen::clients; %{ #include %} %extend ob::Screen { Client *client(int i) { - if (i >= (int)self->clients.size()) + if (i < 0 || i >= (int)self->clients.size()) return NULL; ob::Client::List::iterator it = self->clients.begin(); std::advance(it,i); @@ -107,9 +110,16 @@ void python_callback(PyObject *func, KeyData *data) } }; -%ignore otk::Display::display; +%include "../otk/ustring.i" + +%ignore otk::display; +%inline %{ + otk::Display *Display_instance() { return otk::display; } +%}; + +%ignore otk::Property::atoms; %inline %{ - Display *Display_display() { return otk::Display::display; } + const otk::Atoms& Property_atoms() { return otk::Property::atoms; } %}; %include "../otk/display.hh" @@ -122,12 +132,14 @@ void python_callback(PyObject *func, KeyData *data) %include "../otk/eventhandler.hh" %include "../otk/eventdispatcher.hh" +%import "../otk/widget.hh" %import "widgetbase.hh" %import "actions.hh" %include "openbox.hh" %include "screen.hh" %include "client.hh" +%include "frame.hh" %include "python.hh" // for Mod1Mask etc