]> icculus.org git repositories - mikachu/openbox.git/blob - src/openbox.i
dont move frame if not frame exists while mapping
[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 std_list.i
19 //%template(ClientList) std::list<OBClient*>;
20
21 %ignore ob::Openbox::instance;
22 %inline %{
23   ob::Openbox *Openbox_instance() { return ob::Openbox::instance; }
24 %};
25
26 %ignore ob::OBScreen::clients;
27 %{
28   #include <iterator>
29 %}
30 %extend ob::OBScreen {
31   OBClient *client(int i) {
32     if (i >= (int)self->clients.size())
33       return NULL;
34     ob::OBClient::List::iterator it = self->clients.begin();
35     std::advance(it,i);
36     return *it;
37   }
38   int clientCount() const {
39     return (int) self->clients.size();
40   }
41 };
42
43 %import "../otk/eventdispatcher.hh"
44 %import "../otk/eventhandler.hh"
45 %import "widget.hh"
46 %import "actions.hh"
47
48 %include "openbox.hh"
49 %include "screen.hh"
50 %include "client.hh"
51 %include "python.hh"
52
53 // for Mod1Mask etc
54 %include "X11/X.h"