31#include "meter_python.h"
32#include "graph_python.h"
34PyObject* py_createGraph(PyObject *, PyObject *args)
36 long widget, x, y, w, h, points;
38 if (!PyArg_ParseTuple(args, (
char*)
"llllll", &widget, &x, &y, &w, &h, &points))
40 if (!checkKaramba(widget))
44 new Graph((karamba*)widget, (
int)x, (
int)y, (
int)w, (
int)h, (
int)points);
45 ((karamba*)widget)->meterList->append(tmp);
46 return (Py_BuildValue((
char*)
"l", (long)tmp));
49PyObject* py_deleteGraph(PyObject *, PyObject *args)
52 if (!PyArg_ParseTuple(args, (
char*)
"ll", &widget, &meter))
54 if (!checkKarambaAndMeter(widget, meter,
"Graph"))
57 ((karamba*)widget)->deleteMeterFromSensors((Meter*)meter);
58 return Py_BuildValue((
char*)
"l",
59 ((karamba*)widget)->meterList->removeRef((Meter*)meter));
62PyObject* py_getThemeGraph(PyObject *self, PyObject *args)
64 return py_getThemeMeter(self, args,
"Graph");
67PyObject* py_getGraphSize(PyObject *self, PyObject *args)
69 return py_getSize(self, args,
"Graph");
72PyObject* py_resizeGraph(PyObject *self, PyObject *args)
74 return py_resize(self, args,
"Graph");
77PyObject* py_getGraphPos(PyObject *self, PyObject *args)
79 return py_getPos(self, args,
"Graph");
82PyObject* py_moveGraph(PyObject *self, PyObject *args)
84 return py_move(self, args,
"Graph");
87PyObject* py_hideGraph(PyObject *self, PyObject *args)
89 return py_hide(self, args,
"Graph");
92PyObject* py_showGraph(PyObject *self, PyObject *args)
94 return py_show(self, args,
"Graph");
97PyObject* py_getGraphMinMax(PyObject *self, PyObject *args)
99 return py_getMinMax(self, args,
"Graph");
102PyObject* py_setGraphMinMax(PyObject *self, PyObject *args)
104 return py_setMinMax(self, args,
"Graph");
107PyObject* py_getGraphValue(PyObject *self, PyObject *args)
109 return py_getValue(self, args,
"Graph");
112PyObject* py_setGraphValue(PyObject *self, PyObject *args)
114 return py_setValue(self, args,
"Graph");
117PyObject* py_getGraphSensor(PyObject *self, PyObject *args)
119 return py_getSensor(self, args,
"Graph");
122PyObject* py_setGraphSensor(PyObject *self, PyObject *args)
124 return py_setSensor(self, args,
"Graph");
127PyObject* py_getGraphColor(PyObject *self, PyObject *args)
129 return py_getColor(self, args,
"Graph");
132PyObject* py_setGraphColor(PyObject *self, PyObject *args)
134 return py_setColor(self, args,
"Graph");
PyObject * py_show(PyObject *self, PyObject *args)
Misc/show.
PyObject * py_hide(PyObject *self, PyObject *args)
Misc/hide.