diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-03 21:36:09 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-03 21:36:09 +0000 |
| commit | a0350e27b311db5cab49035752d3852ee68bf8a2 (patch) | |
| tree | 1d53117e9998e39701e296c03bed9b27b1e8af36 /src/openbox_wrap.cc | |
| parent | 86a2bed6595cdc926dccb4a7c0f984fd5996e3c2 (diff) | |
allow "event bindings" via ebind() for new windows/window enter/leave
Diffstat (limited to 'src/openbox_wrap.cc')
| -rw-r--r-- | src/openbox_wrap.cc | 34 |
1 files changed, 13 insertions, 21 deletions
diff --git a/src/openbox_wrap.cc b/src/openbox_wrap.cc index 8ed3bc44..ecc21e32 100644 --- a/src/openbox_wrap.cc +++ b/src/openbox_wrap.cc @@ -2554,15 +2554,16 @@ static PyObject *_wrap_kbind(PyObject *self, PyObject *args) { } -static PyObject *_wrap_kunbind(PyObject *self, PyObject *args) { +static PyObject *_wrap_ebind(PyObject *self, PyObject *args) { PyObject *resultobj; - PyObject *arg1 = (PyObject *) 0 ; + int arg1 ; + PyObject *arg2 = (PyObject *) 0 ; PyObject *result; - PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; - if(!PyArg_ParseTuple(args,(char *)"O:kunbind",&obj0)) goto fail; - arg1 = obj0; - result = (PyObject *)ob::kunbind(arg1); + if(!PyArg_ParseTuple(args,(char *)"iO:ebind",&arg1,&obj1)) goto fail; + arg2 = obj1; + result = (PyObject *)ob::ebind((ob::EventAction )arg1,arg2); resultobj = result; return resultobj; @@ -2571,19 +2572,6 @@ static PyObject *_wrap_kunbind(PyObject *self, PyObject *args) { } -static PyObject *_wrap_kunbind_all(PyObject *self, PyObject *args) { - PyObject *resultobj; - - if(!PyArg_ParseTuple(args,(char *)":kunbind_all")) goto fail; - ob::kunbind_all(); - - Py_INCREF(Py_None); resultobj = Py_None; - return resultobj; - fail: - return NULL; -} - - static PyObject *_wrap_set_reset_key(PyObject *self, PyObject *args) { PyObject *resultobj; std::string *arg1 = 0 ; @@ -2706,8 +2694,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"OBClient_swigregister", OBClient_swigregister, METH_VARARGS }, { (char *)"mbind", _wrap_mbind, METH_VARARGS }, { (char *)"kbind", _wrap_kbind, METH_VARARGS }, - { (char *)"kunbind", _wrap_kunbind, METH_VARARGS }, - { (char *)"kunbind_all", _wrap_kunbind_all, METH_VARARGS }, + { (char *)"ebind", _wrap_ebind, METH_VARARGS }, { (char *)"set_reset_key", _wrap_set_reset_key, METH_VARARGS }, { NULL, NULL } }; @@ -2867,6 +2854,11 @@ static swig_const_info swig_const_table[] = { { SWIG_PY_INT, (char *)"KC_Menu", (long) ob::KC_Menu, 0, 0, 0}, { SWIG_PY_INT, (char *)"KC_All", (long) ob::KC_All, 0, 0, 0}, { SWIG_PY_INT, (char *)"NUM_KEY_CONTEXT", (long) ob::NUM_KEY_CONTEXT, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"EventEnterWindow", (long) ob::EventEnterWindow, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"EventLeaveWindow", (long) ob::EventLeaveWindow, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"EventNewWindow", (long) ob::EventNewWindow, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"EventCloseWindow", (long) ob::EventCloseWindow, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"NUM_EVENTS", (long) ob::NUM_EVENTS, 0, 0, 0}, { SWIG_PY_INT, (char *)"X_PROTOCOL", (long) 11, 0, 0, 0}, { SWIG_PY_INT, (char *)"X_PROTOCOL_REVISION", (long) 0, 0, 0, 0}, { SWIG_PY_INT, (char *)"None", (long) 0L, 0, 0, 0}, |
