]> Dogcows Code - chaz/openbox/blobdiff - wrap/ob.i
rm the old code including the .pys and the c++ shit
[chaz/openbox] / wrap / ob.i
index ba59d4d311261cb48407c6696cbf5571e25a4168..b6c9461e7cd23adab3edcf7eb1b6ebb9d54a4edd 100644 (file)
--- a/wrap/ob.i
+++ b/wrap/ob.i
@@ -3,73 +3,8 @@
 %module ob
 
 %{
-#include "config.h"
-
-#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<Client*>;
-%include "callback.i"
-
-%immutable ob::openbox;
-/*
-%ignore ob::openbox;
-%inline %{
-  ob::Openbox *Openbox_instance() { return ob::openbox; }
-%};
-*/
-
-%ignore ob::Screen::clients;
-%{
-  #include <iterator>
-%}
-%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();
-  }
-};
-
-// do this through events
-%ignore ob::Screen::showDesktop(bool);
-
-%ignore ob::Screen::managed;
-%ignore ob::Screen::config;
-
-%import "otk.i"
-
-%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 <X11/Xlib.h>
+#include "otk/display.hh"
 void send_client_msg(Window target, Atom type, Window about,
                      long data=0, long data1=0, long data2=0,
                      long data3=0, long data4=0)
@@ -90,6 +25,30 @@ void send_client_msg(Window target, Atom type, Window about,
              &e);
 }
 
+%}
+
+%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 <string>
+#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))
This page took 0.021863 seconds and 4 git commands to generate.