diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-27 13:42:41 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-27 13:42:41 +0000 |
| commit | 5face4c6f35172761367f63ac0b6eaf62d84e532 (patch) | |
| tree | 061851b68cc6e2d645b5966f76fa4ad0d300af92 /src | |
| parent | 5168a8add5ed46f74b615ecc60738c1113606734 (diff) | |
use otk objects in the ob scripts by importing otk
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile.am | 6 | ||||
| -rw-r--r-- | src/client.cc | 4 | ||||
| -rw-r--r-- | src/openbox.i | 4 | ||||
| -rw-r--r-- | src/python.cc | 8 | ||||
| -rw-r--r-- | src/screen.cc | 2 |
5 files changed, 15 insertions, 9 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index e697fc45..0b35f72a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,7 +15,7 @@ INCLUDES= -I.. bin_PROGRAMS= openbox3 -openbox3_LDADD=-L../otk -lotk @LIBINTL@ +openbox3_LDADD=-L../otk -lotk -lswigpy @LIBINTL@ openbox3_SOURCES= actions.cc client.cc frame.cc openbox.cc screen.cc \ main.cc backgroundwidget.cc labelwidget.cc \ @@ -35,7 +35,7 @@ distclean-local: openbox.i: openbox.hh screen.hh client.hh python.hh frame.hh touch $@ -openbox_wrap.cc: openbox.i - swig -I../otk $(filter -I%,$(CXXFLAGS)) -python -shadow -c++ -nodefault -o $@ $< +%_wrap.cc: %.i + swig -c -I../otk $(filter -I%,$(CXXFLAGS)) -python -shadow -c++ -nodefault -o $@ $< # local dependencies diff --git a/src/client.cc b/src/client.cc index 2c3d3ad3..eeb09a37 100644 --- a/src/client.cc +++ b/src/client.cc @@ -575,8 +575,8 @@ void Client::updateStrut() _strut.left = data[0]; _strut.right = data[1]; _strut.top = data[2]; - _strut.bottom = data[3]; - + _strut.bottom = data[3]; + openbox->screen(_screen)->updateStrut(); } diff --git a/src/openbox.i b/src/openbox.i index 7ab588e1..b3d1a9ed 100644 --- a/src/openbox.i +++ b/src/openbox.i @@ -110,6 +110,7 @@ void python_callback(PyObject *func, KeyData *data) } }; +/* %include "../otk/ustring.i" %ignore otk::display; @@ -133,6 +134,9 @@ void python_callback(PyObject *func, KeyData *data) %include "../otk/eventdispatcher.hh" %import "../otk/widget.hh" +*/ +%import "../otk/otk.i" + %import "widgetbase.hh" %import "actions.hh" diff --git a/src/python.cc b/src/python.cc index f95d4723..a7e2eada 100644 --- a/src/python.cc +++ b/src/python.cc @@ -9,8 +9,9 @@ #include "otk/util.hh" extern "C" { -// The initializer in openbox_wrap.cc +// The initializer in openbox_wrap.cc / otk_wrap.cc extern void init_ob(void); +extern void init_otk(void); } namespace ob { @@ -23,6 +24,7 @@ void python_init(char *argv0) Py_SetProgramName(argv0); Py_Initialize(); // initialize the C python module + init_otk(); init_ob(); // include the openbox directories for python scripts in the sys path PyRun_SimpleString("import sys"); @@ -30,10 +32,10 @@ void python_init(char *argv0) otk::expandTilde("~/.openbox/python") + "')").c_str())); PyRun_SimpleString("sys.path.append('" SCRIPTDIR "')"); - PyRun_SimpleString("import ob;"); + PyRun_SimpleString("import ob; import otk;"); // set up convenience global variables PyRun_SimpleString("ob.openbox = ob.Openbox_instance()"); - PyRun_SimpleString("ob.display = ob.Display_instance()"); + PyRun_SimpleString("otk.display = otk.Display_instance()"); // set up access to the python global variables PyObject *obmodule = PyImport_AddModule("config"); diff --git a/src/screen.cc b/src/screen.cc index 51a6f76e..6c1551b5 100644 --- a/src/screen.cc +++ b/src/screen.cc @@ -261,7 +261,7 @@ void Screen::calcArea() #endif // XINERAMA */ - if (old_area != _area) + //if (old_area != _area) // XXX: re-maximize windows changeWorkArea(); |
