ekg2
|
00001 /* $Id$ */ 00002 00003 /* 00004 * (C) Copyright 2004-2005 Leszek Krupiński <leafnode@pld-linux.org> 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License Version 2 as 00008 * published by the Free Software Foundation. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 */ 00019 00020 #ifndef __PYTHON_EKG_H_ 00021 #define __PYTHON_EKG_H_ 00022 00023 #include <Python.h> 00024 #include <ekg/windows.h> 00025 00026 PyObject * python_build_session(char * name); 00027 PyObject * python_build_window_id(int id); 00028 PyObject * python_build_window_w(window_t *w); 00029 PyObject * ekg_cmd_command_bind(PyObject *self, PyObject *args); 00030 PyObject * ekg_cmd_command(PyObject *self, PyObject *args); 00031 PyObject * ekg_cmd_debug(PyObject *self, PyObject *args); 00032 PyObject * ekg_cmd_echo(PyObject *self, PyObject *args); 00033 PyObject * ekg_cmd_handler_bind(PyObject *self, PyObject *args); 00034 PyObject * ekg_cmd_plugin_get(PyObject *self, PyObject *args); 00035 PyObject * ekg_cmd_plugins(PyObject *self, PyObject *args); 00036 PyObject * ekg_cmd_printf(PyObject *self, PyObject *pyargs); 00037 PyObject * ekg_cmd_session_current(PyObject *self, PyObject *args); 00038 PyObject * ekg_cmd_session_get(PyObject *self, PyObject *args); 00039 PyObject * ekg_cmd_sessions(PyObject *self, PyObject *args); 00040 PyObject * ekg_cmd_timer_bind(PyObject * self, PyObject * args); 00041 PyObject * ekg_cmd_variable_add(PyObject * self, PyObject * args); 00042 PyObject * ekg_cmd_watch_add(PyObject *self, PyObject *args); 00043 PyObject * ekg_cmd_window_current(PyObject *self, PyObject *args); 00044 PyObject * ekg_cmd_window_get(PyObject *self, PyObject *args); 00045 PyObject * ekg_cmd_window_new(PyObject *self, PyObject *args); 00046 PyObject * ekg_cmd_windows(PyObject *self, PyObject *args); 00047 00048 00053 staticforward PyMethodDef ekg_methods[] = { 00054 { "command_bind", ekg_cmd_command_bind, METH_VARARGS, "Bind function with command" }, 00055 { "command", ekg_cmd_command, METH_VARARGS, "Execute command" }, 00056 { "debug", ekg_cmd_debug, METH_VARARGS, "Log debug data" }, 00057 { "echo", ekg_cmd_echo, METH_VARARGS, "Print string to current window" }, 00058 { "handler_bind", ekg_cmd_handler_bind, METH_VARARGS, "Bind handler function" }, 00059 { "plugin_get", ekg_cmd_plugin_get, METH_VARARGS, "Return plugin object" }, 00060 { "plugins", ekg_cmd_plugins, METH_VARARGS, "Return list of plugins" }, 00061 { "printf", ekg_cmd_printf, METH_VARARGS, "Print formatted string" }, 00062 { "session_current", ekg_cmd_session_current, METH_VARARGS, "Return current session object" }, 00063 { "session_get", ekg_cmd_session_get, METH_VARARGS, "Return session object" }, 00064 { "sessions", ekg_cmd_sessions, METH_VARARGS, "Return list of sessions" }, 00065 { "timer_bind", ekg_cmd_timer_bind, METH_VARARGS, "Add timer function" }, 00066 { "variable_add", ekg_cmd_variable_add, METH_VARARGS, "Add variable with optional handler" }, 00067 { "watch_add", ekg_cmd_watch_add, METH_VARARGS, "Create descriptor watch" }, 00068 { "window_current", ekg_cmd_window_current, METH_VARARGS, "Return current window object" }, 00069 { "window_get", ekg_cmd_window_get, METH_VARARGS, "Return window with given name" }, 00070 { "window_new", ekg_cmd_window_new, METH_VARARGS, "Create window" }, 00071 { "windows", ekg_cmd_windows, METH_VARARGS, "Return list of windows" }, 00072 { NULL, NULL, 0, NULL } 00073 }; 00074 00075 00076 #endif 00077 00078 /* 00079 * Local Variables: 00080 * mode: c 00081 * c-file-style: "k&r" 00082 * c-basic-offset: 8 00083 * indent-tabs-mode: t 00084 * End: 00085 * vim: sts=8 sw=8 00086 */