1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
7 # include "../config.h"
13 #include "bindings.hh"
21 //%template(ClientList) std::list<Client*>;
23 %ignore ob::Openbox::instance;
25 ob::Openbox *Openbox_instance() { return ob::Openbox::instance; }
30 void python_callback(PyObject *func, MouseData *data)
35 arglist = Py_BuildValue("(O)", SWIG_NewPointerObj((void *) data,
36 SWIGTYPE_p_ob__MouseData,
40 result = PyEval_CallObject(func, arglist);
41 if (!result || PyErr_Occurred()) {
42 // an exception occured in the script, display it
50 void python_callback(PyObject *func, EventData *data)
55 arglist = Py_BuildValue("(O)", SWIG_NewPointerObj((void *) data,
56 SWIGTYPE_p_ob__EventData,
60 result = PyEval_CallObject(func, arglist);
61 if (!result || PyErr_Occurred()) {
62 // an exception occured in the script, display it
70 void python_callback(PyObject *func, KeyData *data)
75 arglist = Py_BuildValue("(O)", SWIG_NewPointerObj((void *) data,
76 SWIGTYPE_p_ob__KeyData,
80 result = PyEval_CallObject(func, arglist);
81 if (!result || PyErr_Occurred()) {
82 // an exception occured in the script, display it
93 %ignore ob::Screen::clients;
98 Client *client(int i) {
99 if (i >= (int)self->clients.size())
101 ob::Client::List::iterator it = self->clients.begin();
105 int clientCount() const {
106 return (int) self->clients.size();
110 %ignore otk::Display::display;
112 Display *Display_display() { return otk::Display::display; }
115 %include "../otk/display.hh"
116 %include "../otk/point.hh"
117 %include "../otk/property.hh"
118 %include "../otk/rect.hh"
119 %include "../otk/screeninfo.hh"
120 %include "../otk/strut.hh"
122 %include "../otk/eventhandler.hh"
123 %include "../otk/eventdispatcher.hh"
125 %import "widgetbase.hh"
128 %include "openbox.hh"