1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
7 # include "../config.h"
14 #include "bindings.hh"
22 //%template(ClientList) std::list<Client*>;
26 ob::Openbox *Openbox_instance() { return ob::openbox; }
31 void python_callback(PyObject *func, MouseData *data)
36 arglist = Py_BuildValue("(O)", SWIG_NewPointerObj((void *) data,
37 SWIGTYPE_p_ob__MouseData,
41 result = PyEval_CallObject(func, arglist);
42 if (!result || PyErr_Occurred()) {
43 // an exception occured in the script, display it
51 void python_callback(PyObject *func, EventData *data)
56 arglist = Py_BuildValue("(O)", SWIG_NewPointerObj((void *) data,
57 SWIGTYPE_p_ob__EventData,
61 result = PyEval_CallObject(func, arglist);
62 if (!result || PyErr_Occurred()) {
63 // an exception occured in the script, display it
71 void python_callback(PyObject *func, KeyData *data)
76 arglist = Py_BuildValue("(O)", SWIG_NewPointerObj((void *) data,
77 SWIGTYPE_p_ob__KeyData,
81 result = PyEval_CallObject(func, arglist);
82 if (!result || PyErr_Occurred()) {
83 // an exception occured in the script, display it
96 %ignore ob::Screen::clients;
101 Client *client(int i) {
102 if (i < 0 || i >= (int)self->clients.size())
104 ob::Client::List::iterator it = self->clients.begin();
108 int clientCount() const {
109 return (int) self->clients.size();
114 %include "../otk/ustring.i"
116 %ignore otk::display;
118 otk::Display *Display_instance() { return otk::display; }
121 %ignore otk::Property::atoms;
123 const otk::Atoms& Property_atoms() { return otk::Property::atoms; }
126 %include "../otk/display.hh"
127 %include "../otk/point.hh"
128 %include "../otk/property.hh"
129 %include "../otk/rect.hh"
130 %include "../otk/screeninfo.hh"
131 %include "../otk/strut.hh"
133 %include "../otk/eventhandler.hh"
134 %include "../otk/eventdispatcher.hh"
136 %import "../otk/widget.hh"
138 %import "../otk/otk.i"
140 %import "widgetbase.hh"
143 %include "openbox.hh"