X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fopenbox_wrap.cc;h=118fe1af95ec2090fa41d7458254aa3837221178;hb=d7a30f93b517ac76816d0acea92e9c56ad5d6594;hp=5cf5d8ea62a4298d55c4acedaba6c9cf8dd334d8;hpb=8c0fe026fe45d5cccfb0175f698d088d3eb9bc13;p=chaz%2Fopenbox diff --git a/src/openbox_wrap.cc b/src/openbox_wrap.cc index 5cf5d8ea..118fe1af 100644 --- a/src/openbox_wrap.cc +++ b/src/openbox_wrap.cc @@ -650,26 +650,28 @@ SWIG_InstallConstants(PyObject *d, swig_const_info constants[]) { #define SWIGTYPE_p_ob__OBScreen swig_types[2] #define SWIGTYPE_p_otk__Style swig_types[3] #define SWIGTYPE_p_ob__OBFrame swig_types[4] -#define SWIGTYPE_p_ob__OBClient swig_types[5] -#define SWIGTYPE_p_ob__Openbox swig_types[6] -#define SWIGTYPE_p_otk__Strut swig_types[7] -#define SWIGTYPE_p_XShapeEvent swig_types[8] -#define SWIGTYPE_p_XConfigureRequestEvent swig_types[9] -#define SWIGTYPE_p_otk__OtkEventHandler swig_types[10] -#define SWIGTYPE_p_otk__Rect swig_types[11] -#define SWIGTYPE_p_ob__OBWidget swig_types[12] -#define SWIGTYPE_p_XFocusChangeEvent swig_types[13] -#define SWIGTYPE_p_XClientMessageEvent swig_types[14] -#define SWIGTYPE_p_otk__OBProperty swig_types[15] -#define SWIGTYPE_p_otk__OtkEventDispatcher swig_types[16] -#define SWIGTYPE_p_XPropertyEvent swig_types[17] -#define SWIGTYPE_p_XDestroyWindowEvent swig_types[18] -#define SWIGTYPE_p_otk__BImageControl swig_types[19] -#define SWIGTYPE_p_PyObject swig_types[20] -#define SWIGTYPE_p_ob__MwmHints swig_types[21] -#define SWIGTYPE_p_otk__Configuration swig_types[22] -#define SWIGTYPE_p_XUnmapEvent swig_types[23] -static swig_type_info *swig_types[25]; +#define SWIGTYPE_p_XReparentEvent swig_types[5] +#define SWIGTYPE_p_ob__OBClient swig_types[6] +#define SWIGTYPE_p_ob__Openbox swig_types[7] +#define SWIGTYPE_p_otk__Strut swig_types[8] +#define SWIGTYPE_p_XShapeEvent swig_types[9] +#define SWIGTYPE_p_XConfigureRequestEvent swig_types[10] +#define SWIGTYPE_p_otk__OtkEventHandler swig_types[11] +#define SWIGTYPE_p_otk__Rect swig_types[12] +#define SWIGTYPE_p_ob__OBWidget swig_types[13] +#define SWIGTYPE_p_XFocusChangeEvent swig_types[14] +#define SWIGTYPE_p_XClientMessageEvent swig_types[15] +#define SWIGTYPE_p_otk__OBProperty swig_types[16] +#define SWIGTYPE_p_otk__OtkEventDispatcher swig_types[17] +#define SWIGTYPE_p_XPropertyEvent swig_types[18] +#define SWIGTYPE_p_XDestroyWindowEvent swig_types[19] +#define SWIGTYPE_p_otk__BImageControl swig_types[20] +#define SWIGTYPE_p_PyObject swig_types[21] +#define SWIGTYPE_p_ob__OBBindings swig_types[22] +#define SWIGTYPE_p_ob__MwmHints swig_types[23] +#define SWIGTYPE_p_otk__Configuration swig_types[24] +#define SWIGTYPE_p_XUnmapEvent swig_types[25] +static swig_type_info *swig_types[27]; /* -------- TYPES TABLE (END) -------- */ @@ -1111,6 +1113,23 @@ static PyObject *_wrap_Openbox_property(PyObject *self, PyObject *args) { } +static PyObject *_wrap_Openbox_bindings(PyObject *self, PyObject *args) { + PyObject *resultobj; + ob::Openbox *arg1 = (ob::Openbox *) 0 ; + ob::OBBindings *result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:Openbox_bindings",&obj0)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_ob__Openbox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + result = (ob::OBBindings *)((ob::Openbox const *)arg1)->bindings(); + + resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_ob__OBBindings, 0); + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_Openbox_screen(PyObject *self, PyObject *args) { PyObject *resultobj; ob::Openbox *arg1 = (ob::Openbox *) 0 ; @@ -2452,6 +2471,28 @@ static PyObject *_wrap_OBClient_destroyHandler(PyObject *self, PyObject *args) { } +static PyObject *_wrap_OBClient_reparentHandler(PyObject *self, PyObject *args) { + PyObject *resultobj; + ob::OBClient *arg1 = (ob::OBClient *) 0 ; + XReparentEvent *arg2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:OBClient_reparentHandler",&obj0,&obj1)) goto fail; + if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_ob__OBClient,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_XReparentEvent,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail; + if (arg2 == NULL) { + PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail; + } + (arg1)->reparentHandler((XReparentEvent const &)*arg2); + + Py_INCREF(Py_None); resultobj = Py_None; + return resultobj; + fail: + return NULL; +} + + static PyObject * OBClient_swigregister(PyObject *self, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -2513,6 +2554,125 @@ static PyObject *_wrap_unregister(PyObject *self, PyObject *args) { } +static PyObject *_wrap_unregister_all(PyObject *self, PyObject *args) { + PyObject *resultobj; + int arg1 ; + bool result; + + if(!PyArg_ParseTuple(args,(char *)"i:unregister_all",&arg1)) goto fail; + result = (bool)ob::python_unregister_all(arg1); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_bind_key(PyObject *self, PyObject *args) { + PyObject *resultobj; + PyObject *arg1 = (PyObject *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + bool result; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:bind_key",&obj0,&obj1)) goto fail; + arg1 = obj0; + arg2 = obj1; + result = (bool)ob::python_bind_key(arg1,arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_unbind_key(PyObject *self, PyObject *args) { + PyObject *resultobj; + PyObject *arg1 = (PyObject *) 0 ; + bool result; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:unbind_key",&obj0)) goto fail; + arg1 = obj0; + result = (bool)ob::python_unbind_key(arg1); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_bind_mouse(PyObject *self, PyObject *args) { + PyObject *resultobj; + std::string *arg1 = 0 ; + PyObject *arg2 = (PyObject *) 0 ; + bool result; + std::string temp1 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"OO:bind_mouse",&obj0,&obj1)) goto fail; + { + if (PyString_Check(obj0)) { + temp1 = std::string(PyString_AsString(obj0)); + arg1 = &temp1; + }else { + SWIG_exception(SWIG_TypeError, "string expected"); + } + } + arg2 = obj1; + result = (bool)ob::python_bind_mouse((std::string const &)*arg1,arg2); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_unbind_mouse(PyObject *self, PyObject *args) { + PyObject *resultobj; + std::string *arg1 = 0 ; + bool result; + std::string temp1 ; + PyObject * obj0 = 0 ; + + if(!PyArg_ParseTuple(args,(char *)"O:unbind_mouse",&obj0)) goto fail; + { + if (PyString_Check(obj0)) { + temp1 = std::string(PyString_AsString(obj0)); + arg1 = &temp1; + }else { + SWIG_exception(SWIG_TypeError, "string expected"); + } + } + result = (bool)ob::python_unbind_mouse((std::string const &)*arg1); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + +static PyObject *_wrap_unbind_all(PyObject *self, PyObject *args) { + PyObject *resultobj; + bool result; + + if(!PyArg_ParseTuple(args,(char *)":unbind_all")) goto fail; + result = (bool)ob::python_unbind_all(); + + resultobj = PyInt_FromLong((long)result); + return resultobj; + fail: + return NULL; +} + + static PyMethodDef SwigMethods[] = { { (char *)"Openbox_instance", _wrap_Openbox_instance, METH_VARARGS }, { (char *)"Cursors_session_set", _wrap_Cursors_session_set, METH_VARARGS }, @@ -2531,6 +2691,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"Openbox_state", _wrap_Openbox_state, METH_VARARGS }, { (char *)"Openbox_timerManager", _wrap_Openbox_timerManager, METH_VARARGS }, { (char *)"Openbox_property", _wrap_Openbox_property, METH_VARARGS }, + { (char *)"Openbox_bindings", _wrap_Openbox_bindings, METH_VARARGS }, { (char *)"Openbox_screen", _wrap_Openbox_screen, METH_VARARGS }, { (char *)"Openbox_screenCount", _wrap_Openbox_screenCount, METH_VARARGS }, { (char *)"Openbox_cursors", _wrap_Openbox_cursors, METH_VARARGS }, @@ -2605,10 +2766,17 @@ static PyMethodDef SwigMethods[] = { { (char *)"OBClient_configureRequestHandler", _wrap_OBClient_configureRequestHandler, METH_VARARGS }, { (char *)"OBClient_unmapHandler", _wrap_OBClient_unmapHandler, METH_VARARGS }, { (char *)"OBClient_destroyHandler", _wrap_OBClient_destroyHandler, METH_VARARGS }, + { (char *)"OBClient_reparentHandler", _wrap_OBClient_reparentHandler, METH_VARARGS }, { (char *)"OBClient_swigregister", OBClient_swigregister, METH_VARARGS }, { (char *)"register", _wrap_register, METH_VARARGS }, { (char *)"preregister", _wrap_preregister, METH_VARARGS }, { (char *)"unregister", _wrap_unregister, METH_VARARGS }, + { (char *)"unregister_all", _wrap_unregister_all, METH_VARARGS }, + { (char *)"bind_key", _wrap_bind_key, METH_VARARGS }, + { (char *)"unbind_key", _wrap_unbind_key, METH_VARARGS }, + { (char *)"bind_mouse", _wrap_bind_mouse, METH_VARARGS }, + { (char *)"unbind_mouse", _wrap_unbind_mouse, METH_VARARGS }, + { (char *)"unbind_all", _wrap_unbind_all, METH_VARARGS }, { NULL, NULL } }; @@ -2632,6 +2800,7 @@ static swig_type_info _swigt__p_ob__Cursors[] = {{"_p_ob__Cursors", 0, "ob::Curs static swig_type_info _swigt__p_ob__OBScreen[] = {{"_p_ob__OBScreen", 0, "ob::OBScreen *", 0},{"_p_ob__OBScreen"},{0}}; static swig_type_info _swigt__p_otk__Style[] = {{"_p_otk__Style", 0, "otk::Style *", 0},{"_p_otk__Style"},{0}}; static swig_type_info _swigt__p_ob__OBFrame[] = {{"_p_ob__OBFrame", 0, "ob::OBFrame *", 0},{"_p_ob__OBFrame"},{0}}; +static swig_type_info _swigt__p_XReparentEvent[] = {{"_p_XReparentEvent", 0, "XReparentEvent *", 0},{"_p_XReparentEvent"},{0}}; static swig_type_info _swigt__p_ob__OBClient[] = {{"_p_ob__OBClient", 0, "ob::OBClient *", 0},{"_p_ob__OBClient"},{0}}; static swig_type_info _swigt__p_ob__Openbox[] = {{"_p_ob__Openbox", 0, "ob::Openbox *", 0},{"_p_ob__Openbox"},{0}}; static swig_type_info _swigt__p_otk__Strut[] = {{"_p_otk__Strut", 0, "otk::Strut *", 0},{"_p_otk__Strut"},{0}}; @@ -2648,6 +2817,7 @@ static swig_type_info _swigt__p_XPropertyEvent[] = {{"_p_XPropertyEvent", 0, "XP static swig_type_info _swigt__p_XDestroyWindowEvent[] = {{"_p_XDestroyWindowEvent", 0, "XDestroyWindowEvent *", 0},{"_p_XDestroyWindowEvent"},{0}}; static swig_type_info _swigt__p_otk__BImageControl[] = {{"_p_otk__BImageControl", 0, "otk::BImageControl *", 0},{"_p_otk__BImageControl"},{0}}; static swig_type_info _swigt__p_PyObject[] = {{"_p_PyObject", 0, "PyObject *", 0},{"_p_PyObject"},{0}}; +static swig_type_info _swigt__p_ob__OBBindings[] = {{"_p_ob__OBBindings", 0, "ob::OBBindings *", 0},{"_p_ob__OBBindings"},{0}}; static swig_type_info _swigt__p_ob__MwmHints[] = {{"_p_ob__MwmHints", 0, "ob::MwmHints *", 0},{"_p_ob__MwmHints"},{0}}; static swig_type_info _swigt__p_otk__Configuration[] = {{"_p_otk__Configuration", 0, "otk::Configuration *", 0},{"_p_otk__Configuration"},{0}}; static swig_type_info _swigt__p_XUnmapEvent[] = {{"_p_XUnmapEvent", 0, "XUnmapEvent *", 0},{"_p_XUnmapEvent"},{0}}; @@ -2658,6 +2828,7 @@ _swigt__p_ob__Cursors, _swigt__p_ob__OBScreen, _swigt__p_otk__Style, _swigt__p_ob__OBFrame, +_swigt__p_XReparentEvent, _swigt__p_ob__OBClient, _swigt__p_ob__Openbox, _swigt__p_otk__Strut, @@ -2674,6 +2845,7 @@ _swigt__p_XPropertyEvent, _swigt__p_XDestroyWindowEvent, _swigt__p_otk__BImageControl, _swigt__p_PyObject, +_swigt__p_ob__OBBindings, _swigt__p_ob__MwmHints, _swigt__p_otk__Configuration, _swigt__p_XUnmapEvent,