diff options
| author | Jeff Armstrong <jeffrey.armstrong@approximatrix.com> | 2011-07-25 21:50:26 -0400 |
|---|---|---|
| committer | Jeff Armstrong <jeffrey.armstrong@approximatrix.com> | 2011-07-25 21:50:26 -0400 |
| commit | e4d9f600d8359e82b7a689896727080d570ab8a8 (patch) | |
| tree | c135a917b2c58152bf60ce474c505c1f7ba468c7 /lib | |
| parent | 5eaecae93f7ba32b6bec9515dfa465130bc8b808 (diff) | |
| download | gempy-e4d9f600d8359e82b7a689896727080d570ab8a8.tar.gz gempy-e4d9f600d8359e82b7a689896727080d570ab8a8.zip | |
Added menu highlight/normal switch. Fixed dialog handling. Extended simple application.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/gem.c | 4 | ||||
| -rw-r--r-- | lib/py_aes.c | 20 | ||||
| -rw-r--r-- | lib/py_aes.h | 1 |
3 files changed, 24 insertions, 1 deletions
@@ -54,6 +54,7 @@ GemMethods[] = { /* AES Menu Library */ {"menu_bar", py_menu_bar, METH_VARARGS, "Install or hide a GEM menubar"}, + {"menu_tnormal", py_menu_tnormal, METH_VARARGS, "Highlight or unhighlight a menu option"}, /* AES Object Library */ {"objc_draw", py_objc_draw, METH_VARARGS, "Draw an AES object to the screen"}, @@ -135,6 +136,7 @@ PROC LibFunc[] = { /* AES Menu Library */ "py_menu_bar", "Internal\n", py_menu_bar, + "py_menu_tnormal", "Internal\n", py_menu_tnormal, /* AES Object Library */ "py_objc_draw", "Internal\n", py_objc_draw, @@ -151,7 +153,7 @@ PROC LibFunc[] = { }; LDGLIB LibLdg[] = { - 0x0001, 31, LibFunc, "GEM Extensions for Python", 0 + 0x0001, 32, LibFunc, "GEM Extensions for Python", 0 }; int main( void) diff --git a/lib/py_aes.c b/lib/py_aes.c index e221ba8..2372705 100644 --- a/lib/py_aes.c +++ b/lib/py_aes.c @@ -530,6 +530,26 @@ int ret; return Py_None; } +PyObject* __CDECL py_menu_tnormal(PyObject *self, PyObject *args) +{ +PyObject *object; +int action; +int menu; +int ret; + + if(!PyArg_ParseTuple(args,"Oii",&object, &menu, &action)) + return NULL; + + ret = menu_tnormal(PyCapsule_GetPointer(object,NULL),(short)menu,(short)action); + + if(ret == 0) { + PyErr_SetString(GEMError,"Menu tnormal failed to set properly"); + return NULL; + } + Py_INCREF(Py_None); + return Py_None; +} + /* Object Library */ PyObject* __CDECL py_objc_draw(PyObject *self, PyObject *args) { diff --git a/lib/py_aes.h b/lib/py_aes.h index 98eff67..a8c6b35 100644 --- a/lib/py_aes.h +++ b/lib/py_aes.h @@ -31,6 +31,7 @@ PyObject* __CDECL py_evnt_multi(PyObject *self, PyObject *args, PyObject *kwargs); PyObject* __CDECL py_menu_bar(PyObject *self, PyObject *args); + PyObject* __CDECL py_menu_tnormal(PyObject *self, PyObject *args); PyObject* __CDECL py_objc_draw(PyObject *self, PyObject *args); |
