]> Dogcows Code - chaz/openbox/blobdiff - src/openbox_wrap.cc
allow "event bindings" via ebind() for new windows/window enter/leave
[chaz/openbox] / src / openbox_wrap.cc
index 90cd3a97b35a8c38c2b43fe4ee3e1cc76c2822b8..ecc21e32741cff7c2210a400dbd58eb56d192fc1 100644 (file)
@@ -1309,6 +1309,34 @@ static PyObject *_wrap_Openbox_shutdown(PyObject *self, PyObject *args) {
 }
 
 
+static PyObject *_wrap_Openbox_execute(PyObject *self, PyObject *args) {
+    PyObject *resultobj;
+    ob::Openbox *arg1 = (ob::Openbox *) 0 ;
+    int arg2 ;
+    std::string *arg3 = 0 ;
+    std::string temp3 ;
+    PyObject * obj0  = 0 ;
+    PyObject * obj2  = 0 ;
+    
+    if(!PyArg_ParseTuple(args,(char *)"OiO:Openbox_execute",&obj0,&arg2,&obj2)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_ob__Openbox,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+    {
+        if (PyString_Check(obj2)) {
+            temp3 = std::string(PyString_AsString(obj2));
+            arg3 = &temp3;
+        }else {
+            SWIG_exception(SWIG_TypeError, "string expected");
+        }
+    }
+    (arg1)->execute(arg2,(std::string const &)*arg3);
+    
+    Py_INCREF(Py_None); resultobj = Py_None;
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject * Openbox_swigregister(PyObject *self, PyObject *args) {
     PyObject *obj;
     if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
@@ -1532,6 +1560,29 @@ static PyObject *_wrap_OBScreen_unmanageWindow(PyObject *self, PyObject *args) {
 }
 
 
+static PyObject *_wrap_OBScreen_restack(PyObject *self, PyObject *args) {
+    PyObject *resultobj;
+    ob::OBScreen *arg1 = (ob::OBScreen *) 0 ;
+    bool arg2 ;
+    ob::OBClient *arg3 = (ob::OBClient *) 0 ;
+    PyObject * obj0  = 0 ;
+    PyObject * obj1  = 0 ;
+    PyObject * obj2  = 0 ;
+    
+    if(!PyArg_ParseTuple(args,(char *)"OOO:OBScreen_restack",&obj0,&obj1,&obj2)) goto fail;
+    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_ob__OBScreen,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+    arg2 = (bool) PyInt_AsLong(obj1);
+    if (PyErr_Occurred()) SWIG_fail;
+    if ((SWIG_ConvertPtr(obj2,(void **) &arg3, SWIGTYPE_p_ob__OBClient,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
+    (arg1)->restack(arg2,arg3);
+    
+    Py_INCREF(Py_None); resultobj = Py_None;
+    return resultobj;
+    fail:
+    return NULL;
+}
+
+
 static PyObject * OBScreen_swigregister(PyObject *self, PyObject *args) {
     PyObject *obj;
     if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL;
@@ -2104,32 +2155,15 @@ static PyObject *_wrap_OBClient_maxHorz(PyObject *self, PyObject *args) {
 }
 
 
-static PyObject *_wrap_OBClient_fullscreen(PyObject *self, PyObject *args) {
+static PyObject *_wrap_OBClient_layer(PyObject *self, PyObject *args) {
     PyObject *resultobj;
     ob::OBClient *arg1 = (ob::OBClient *) 0 ;
-    bool result;
-    PyObject * obj0  = 0 ;
-    
-    if(!PyArg_ParseTuple(args,(char *)"O:OBClient_fullscreen",&obj0)) goto fail;
-    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_ob__OBClient,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    result = (bool)((ob::OBClient const *)arg1)->fullscreen();
-    
-    resultobj = PyInt_FromLong((long)result);
-    return resultobj;
-    fail:
-    return NULL;
-}
-
-
-static PyObject *_wrap_OBClient_floating(PyObject *self, PyObject *args) {
-    PyObject *resultobj;
-    ob::OBClient *arg1 = (ob::OBClient *) 0 ;
-    bool result;
+    int result;
     PyObject * obj0  = 0 ;
     
-    if(!PyArg_ParseTuple(args,(char *)"O:OBClient_floating",&obj0)) goto fail;
+    if(!PyArg_ParseTuple(args,(char *)"O:OBClient_layer",&obj0)) goto fail;
     if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_ob__OBClient,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
-    result = (bool)((ob::OBClient const *)arg1)->floating();
+    result = (int)((ob::OBClient const *)arg1)->layer();
     
     resultobj = PyInt_FromLong((long)result);
     return resultobj;
@@ -2520,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;
@@ -2537,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 ;
@@ -2604,6 +2626,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"Openbox_setFocusedClient", _wrap_Openbox_setFocusedClient, METH_VARARGS },
         { (char *)"Openbox_focusedScreen", _wrap_Openbox_focusedScreen, METH_VARARGS },
         { (char *)"Openbox_shutdown", _wrap_Openbox_shutdown, METH_VARARGS },
+        { (char *)"Openbox_execute", _wrap_Openbox_execute, METH_VARARGS },
         { (char *)"Openbox_swigregister", Openbox_swigregister, METH_VARARGS },
         { (char *)"OBScreen_client", _wrap_OBScreen_client, METH_VARARGS },
         { (char *)"OBScreen_clientCount", _wrap_OBScreen_clientCount, METH_VARARGS },
@@ -2617,6 +2640,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"OBScreen_manageExisting", _wrap_OBScreen_manageExisting, METH_VARARGS },
         { (char *)"OBScreen_manageWindow", _wrap_OBScreen_manageWindow, METH_VARARGS },
         { (char *)"OBScreen_unmanageWindow", _wrap_OBScreen_unmanageWindow, METH_VARARGS },
+        { (char *)"OBScreen_restack", _wrap_OBScreen_restack, METH_VARARGS },
         { (char *)"OBScreen_swigregister", OBScreen_swigregister, METH_VARARGS },
         { (char *)"MwmHints_flags_set", _wrap_MwmHints_flags_set, METH_VARARGS },
         { (char *)"MwmHints_flags_get", _wrap_MwmHints_flags_get, METH_VARARGS },
@@ -2650,8 +2674,7 @@ static PyMethodDef SwigMethods[] = {
         { (char *)"OBClient_iconic", _wrap_OBClient_iconic, METH_VARARGS },
         { (char *)"OBClient_maxVert", _wrap_OBClient_maxVert, METH_VARARGS },
         { (char *)"OBClient_maxHorz", _wrap_OBClient_maxHorz, METH_VARARGS },
-        { (char *)"OBClient_fullscreen", _wrap_OBClient_fullscreen, METH_VARARGS },
-        { (char *)"OBClient_floating", _wrap_OBClient_floating, METH_VARARGS },
+        { (char *)"OBClient_layer", _wrap_OBClient_layer, METH_VARARGS },
         { (char *)"OBClient_toggleClientBorder", _wrap_OBClient_toggleClientBorder, METH_VARARGS },
         { (char *)"OBClient_area", _wrap_OBClient_area, METH_VARARGS },
         { (char *)"OBClient_move", _wrap_OBClient_move, METH_VARARGS },
@@ -2671,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 }
 };
@@ -2760,6 +2782,15 @@ static swig_const_info swig_const_table[] = {
 { SWIG_PY_INT,     (char *)"Openbox_State_Normal", (long) ob::Openbox::State_Normal, 0, 0, 0},
 { SWIG_PY_INT,     (char *)"Openbox_State_Exiting", (long) ob::Openbox::State_Exiting, 0, 0, 0},
 { SWIG_PY_INT,     (char *)"OBScreen_event_mask", (long) ob::OBScreen::event_mask, 0, 0, 0},
+{ SWIG_PY_INT,     (char *)"OBScreen_Layer_Icon", (long) ob::OBScreen::Layer_Icon, 0, 0, 0},
+{ SWIG_PY_INT,     (char *)"OBScreen_Layer_Desktop", (long) ob::OBScreen::Layer_Desktop, 0, 0, 0},
+{ SWIG_PY_INT,     (char *)"OBScreen_Layer_Below", (long) ob::OBScreen::Layer_Below, 0, 0, 0},
+{ SWIG_PY_INT,     (char *)"OBScreen_Layer_Normal", (long) ob::OBScreen::Layer_Normal, 0, 0, 0},
+{ SWIG_PY_INT,     (char *)"OBScreen_Layer_Above", (long) ob::OBScreen::Layer_Above, 0, 0, 0},
+{ SWIG_PY_INT,     (char *)"OBScreen_Layer_Top", (long) ob::OBScreen::Layer_Top, 0, 0, 0},
+{ SWIG_PY_INT,     (char *)"OBScreen_Layer_Fullscreen", (long) ob::OBScreen::Layer_Fullscreen, 0, 0, 0},
+{ SWIG_PY_INT,     (char *)"OBScreen_Layer_Internal", (long) ob::OBScreen::Layer_Internal, 0, 0, 0},
+{ SWIG_PY_INT,     (char *)"OBScreen_NUM_LAYERS", (long) ob::OBScreen::NUM_LAYERS, 0, 0, 0},
 { SWIG_PY_INT,     (char *)"MwmHints_elements", (long) ob::MwmHints::elements, 0, 0, 0},
 { SWIG_PY_INT,     (char *)"OBClient_TopLeft", (long) ob::OBClient::TopLeft, 0, 0, 0},
 { SWIG_PY_INT,     (char *)"OBClient_TopRight", (long) ob::OBClient::TopRight, 0, 0, 0},
@@ -2823,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},
This page took 0.024871 seconds and 4 git commands to generate.