31 #include "meter_python.h" 32 #include "graph_python.h" 34 PyObject* 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));
49 PyObject* 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));
62 PyObject* py_getThemeGraph(PyObject *
self, PyObject *args)
64 return py_getThemeMeter(
self, args,
"Graph");
67 PyObject* py_getGraphSize(PyObject *
self, PyObject *args)
69 return py_getSize(
self, args,
"Graph");
72 PyObject* py_resizeGraph(PyObject *
self, PyObject *args)
74 return py_resize(
self, args,
"Graph");
77 PyObject* py_getGraphPos(PyObject *
self, PyObject *args)
79 return py_getPos(
self, args,
"Graph");
82 PyObject* py_moveGraph(PyObject *
self, PyObject *args)
84 return py_move(
self, args,
"Graph");
87 PyObject* py_hideGraph(PyObject *
self, PyObject *args)
89 return py_hide(
self, args,
"Graph");
92 PyObject* py_showGraph(PyObject *
self, PyObject *args)
94 return py_show(
self, args,
"Graph");
97 PyObject* py_getGraphMinMax(PyObject *
self, PyObject *args)
99 return py_getMinMax(
self, args,
"Graph");
102 PyObject* py_setGraphMinMax(PyObject *
self, PyObject *args)
104 return py_setMinMax(
self, args,
"Graph");
107 PyObject* py_getGraphValue(PyObject *
self, PyObject *args)
109 return py_getValue(
self, args,
"Graph");
112 PyObject* py_setGraphValue(PyObject *
self, PyObject *args)
114 return py_setValue(
self, args,
"Graph");
117 PyObject* py_getGraphSensor(PyObject *
self, PyObject *args)
119 return py_getSensor(
self, args,
"Graph");
122 PyObject* py_setGraphSensor(PyObject *
self, PyObject *args)
124 return py_setSensor(
self, args,
"Graph");
127 PyObject* py_getGraphColor(PyObject *
self, PyObject *args)
129 return py_getColor(
self, args,
"Graph");
132 PyObject* py_setGraphColor(PyObject *
self, PyObject *args)
134 return py_setColor(
self, args,
"Graph");
PyObject * py_hide(PyObject *self, PyObject *args)
Misc/hide.
PyObject * py_show(PyObject *self, PyObject *args)
Misc/show.