]> icculus.org git repositories - mikachu/openbox.git/blob - src/openbox.i
transient window support..halfway
[mikachu/openbox.git] / src / openbox.i
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2
3 %module openbox
4
5 %{
6 #ifdef HAVE_CONFIG_H
7 #  include "../config.h"
8 #endif
9
10 #include "openbox.hh"
11 #include "screen.hh"
12 #include "client.hh"
13 #include "bindings.hh"
14 #include "actions.hh"
15 %}
16
17 %include "stl.i"
18 %include "exception.i"
19 //%include std_list.i
20 //%template(ClientList) std::list<OBClient*>;
21
22 %ignore ob::Openbox::instance;
23 %inline %{
24   ob::Openbox *Openbox_instance() { return ob::Openbox::instance; }
25 %};
26
27 %ignore ob::OBScreen::clients;
28 %{
29   #include <iterator>
30 %}
31 %extend ob::OBScreen {
32   OBClient *client(int i) {
33     if (i >= (int)self->clients.size())
34       return NULL;
35     ob::OBClient::List::iterator it = self->clients.begin();
36     std::advance(it,i);
37     return *it;
38   }
39   int clientCount() const {
40     return (int) self->clients.size();
41   }
42 };
43
44 %import "../otk/eventdispatcher.hh"
45 %import "../otk/eventhandler.hh"
46 %import "widget.hh"
47 %import "actions.hh"
48
49 %include "openbox.hh"
50 %include "screen.hh"
51 %include "client.hh"
52 %include "python.hh"
53
54 // for Mod1Mask etc
55 %include "X11/X.h"