ekg2
Strona główna
Dodatkowe strony
Moduły
Struktury Danych
Pliki
Lista plików
Globalne
All
Struktury Danych
Pliki
Funkcje
Zmienne
Definicje typów
Wyliczenia
Wartości wyliczeń
Definicje
Grupay
Strony
plugins
python
python-window.h
Idź do dokumentacji tego pliku.
1
/* $Id$ */
2
3
/*
4
* (C) Copyright 2004-2005 Leszek Krupiński <leafnode@pld-linux.org>
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License Version 2 as
8
* published by the Free Software Foundation.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
*/
19
20
#ifndef __PYTHON_WINDOW_H_
21
22
#define __PYTHON_WINDOW_H_
23
24
#include <Python.h>
25
#include <
ekg/windows.h
>
26
27
typedef
struct
28
{
29
PyObject_HEAD
;
30
window_t
*
w
;
31
}
ekg_windowObj
;
32
33
void
ekg_window_dealloc
(
ekg_windowObj
*o);
34
PyObject *
ekg_window_repr
(
ekg_windowObj
*
self
);
35
PyObject *
ekg_window_str
(
ekg_windowObj
*
self
);
36
int
ekg_window_init
(
ekg_windowObj
*
self
, PyObject *args, PyObject *kwds);
37
PyObject*
ekg_window_switch_to
(
ekg_windowObj
*
self
, PyObject *args);
38
PyObject*
ekg_window_echo
(
ekg_windowObj
*
self
, PyObject *args);
39
PyObject*
ekg_window_echo_format
(
ekg_windowObj
*
self
, PyObject *args);
40
PyObject*
ekg_window_kill
(
ekg_windowObj
*
self
, PyObject *args);
41
PyObject*
ekg_window_get_attr
(
ekg_windowObj
*
self
,
char
* attr);
42
PyObject*
ekg_window_next
(
ekg_windowObj
*
self
, PyObject *args);
43
PyObject*
ekg_window_prev
(
ekg_windowObj
*
self
, PyObject *args);
44
45
staticforward PyMethodDef
ekg_window_methods
[] = {
46
{
"switch_to"
, (PyCFunction)
ekg_window_switch_to
, METH_VARARGS,
"Switch to this window"
},
47
{
"echo"
, (PyCFunction)
ekg_window_echo
, METH_VARARGS,
"Print string on this window"
},
48
{
"echo_format"
, (PyCFunction)
ekg_window_echo_format
, METH_VARARGS,
"Print formatted string on this window"
},
49
{
"kill"
, (PyCFunction)
ekg_window_kill
, METH_VARARGS,
"Kill window"
},
50
{
"next"
, (PyCFunction)
ekg_window_next
, METH_VARARGS,
"Return next window"
},
51
{
"prev"
, (PyCFunction)
ekg_window_prev
, METH_VARARGS,
"Return previous window"
},
52
{
NULL
,
NULL
, 0, NULL}
53
};
54
55
static
PyTypeObject
ekg_window_type
= {
56
PyObject_HEAD_INIT(
NULL
)
57
0,
58
"window"
,
59
sizeof
(
ekg_windowObj
),
60
0,
61
(destructor)
ekg_window_dealloc
,
62
0,
63
(getattrfunc)
ekg_window_get_attr
,
64
0,
65
0,
66
(reprfunc)
ekg_window_repr
,
67
0,
68
0,
69
0,
70
0,
/*tp_hash */
71
0,
/*tp_call*/
72
(reprfunc)
ekg_window_str
,
/*tp_str*/
73
0,
/*tp_getattro*/
74
0,
/*tp_setattro*/
75
0,
/*tp_as_buffer*/
76
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
/*tp_flags*/
77
"Window object"
,
/* tp_doc */
78
0,
/* tp_traverse */
79
0,
/* tp_clear */
80
0,
/* tp_richcompare */
81
0,
/* tp_weaklistoffset */
82
0,
/* tp_iter */
83
0,
/* tp_iternext */
84
ekg_window_methods
,
/* tp_methods */
85
0,
/* tp_members */
86
0,
/* tp_getset */
87
0,
/* tp_base */
88
0,
/* tp_dict */
89
0,
/* tp_descr_get */
90
0,
/* tp_descr_set */
91
0,
/* tp_dictoffset */
92
(initproc)
ekg_window_init
,
/* tp_init */
93
0,
/* tp_alloc */
94
0,
/* tp_new */
95
};
96
97
98
#endif
99
100
/*
101
* Local Variables:
102
* mode: c
103
* c-file-style: "k&r"
104
* c-basic-offset: 8
105
* indent-tabs-mode: t
106
* End:
107
* vim: sts=8 sw=8
108
*/
Wygenerowano Pt, 21 mar 2014 17:50:26 dla ekg2 programem
1.8.1.2