• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*[clinic input]
2 preserve
3 [clinic start generated code]*/
4 
5 PyDoc_STRVAR(_curses_panel_panel_bottom__doc__,
6 "bottom($self, /)\n"
7 "--\n"
8 "\n"
9 "Push the panel to the bottom of the stack.");
10 
11 #define _CURSES_PANEL_PANEL_BOTTOM_METHODDEF    \
12     {"bottom", (PyCFunction)_curses_panel_panel_bottom, METH_NOARGS, _curses_panel_panel_bottom__doc__},
13 
14 static PyObject *
15 _curses_panel_panel_bottom_impl(PyCursesPanelObject *self);
16 
17 static PyObject *
_curses_panel_panel_bottom(PyCursesPanelObject * self,PyObject * Py_UNUSED (ignored))18 _curses_panel_panel_bottom(PyCursesPanelObject *self, PyObject *Py_UNUSED(ignored))
19 {
20     return _curses_panel_panel_bottom_impl(self);
21 }
22 
23 PyDoc_STRVAR(_curses_panel_panel_hide__doc__,
24 "hide($self, /)\n"
25 "--\n"
26 "\n"
27 "Hide the panel.\n"
28 "\n"
29 "This does not delete the object, it just makes the window on screen invisible.");
30 
31 #define _CURSES_PANEL_PANEL_HIDE_METHODDEF    \
32     {"hide", (PyCFunction)_curses_panel_panel_hide, METH_NOARGS, _curses_panel_panel_hide__doc__},
33 
34 static PyObject *
35 _curses_panel_panel_hide_impl(PyCursesPanelObject *self);
36 
37 static PyObject *
_curses_panel_panel_hide(PyCursesPanelObject * self,PyObject * Py_UNUSED (ignored))38 _curses_panel_panel_hide(PyCursesPanelObject *self, PyObject *Py_UNUSED(ignored))
39 {
40     return _curses_panel_panel_hide_impl(self);
41 }
42 
43 PyDoc_STRVAR(_curses_panel_panel_show__doc__,
44 "show($self, /)\n"
45 "--\n"
46 "\n"
47 "Display the panel (which might have been hidden).");
48 
49 #define _CURSES_PANEL_PANEL_SHOW_METHODDEF    \
50     {"show", (PyCFunction)_curses_panel_panel_show, METH_NOARGS, _curses_panel_panel_show__doc__},
51 
52 static PyObject *
53 _curses_panel_panel_show_impl(PyCursesPanelObject *self);
54 
55 static PyObject *
_curses_panel_panel_show(PyCursesPanelObject * self,PyObject * Py_UNUSED (ignored))56 _curses_panel_panel_show(PyCursesPanelObject *self, PyObject *Py_UNUSED(ignored))
57 {
58     return _curses_panel_panel_show_impl(self);
59 }
60 
61 PyDoc_STRVAR(_curses_panel_panel_top__doc__,
62 "top($self, /)\n"
63 "--\n"
64 "\n"
65 "Push panel to the top of the stack.");
66 
67 #define _CURSES_PANEL_PANEL_TOP_METHODDEF    \
68     {"top", (PyCFunction)_curses_panel_panel_top, METH_NOARGS, _curses_panel_panel_top__doc__},
69 
70 static PyObject *
71 _curses_panel_panel_top_impl(PyCursesPanelObject *self);
72 
73 static PyObject *
_curses_panel_panel_top(PyCursesPanelObject * self,PyObject * Py_UNUSED (ignored))74 _curses_panel_panel_top(PyCursesPanelObject *self, PyObject *Py_UNUSED(ignored))
75 {
76     return _curses_panel_panel_top_impl(self);
77 }
78 
79 PyDoc_STRVAR(_curses_panel_panel_above__doc__,
80 "above($self, /)\n"
81 "--\n"
82 "\n"
83 "Return the panel above the current panel.");
84 
85 #define _CURSES_PANEL_PANEL_ABOVE_METHODDEF    \
86     {"above", (PyCFunction)_curses_panel_panel_above, METH_NOARGS, _curses_panel_panel_above__doc__},
87 
88 static PyObject *
89 _curses_panel_panel_above_impl(PyCursesPanelObject *self);
90 
91 static PyObject *
_curses_panel_panel_above(PyCursesPanelObject * self,PyObject * Py_UNUSED (ignored))92 _curses_panel_panel_above(PyCursesPanelObject *self, PyObject *Py_UNUSED(ignored))
93 {
94     return _curses_panel_panel_above_impl(self);
95 }
96 
97 PyDoc_STRVAR(_curses_panel_panel_below__doc__,
98 "below($self, /)\n"
99 "--\n"
100 "\n"
101 "Return the panel below the current panel.");
102 
103 #define _CURSES_PANEL_PANEL_BELOW_METHODDEF    \
104     {"below", (PyCFunction)_curses_panel_panel_below, METH_NOARGS, _curses_panel_panel_below__doc__},
105 
106 static PyObject *
107 _curses_panel_panel_below_impl(PyCursesPanelObject *self);
108 
109 static PyObject *
_curses_panel_panel_below(PyCursesPanelObject * self,PyObject * Py_UNUSED (ignored))110 _curses_panel_panel_below(PyCursesPanelObject *self, PyObject *Py_UNUSED(ignored))
111 {
112     return _curses_panel_panel_below_impl(self);
113 }
114 
115 PyDoc_STRVAR(_curses_panel_panel_hidden__doc__,
116 "hidden($self, /)\n"
117 "--\n"
118 "\n"
119 "Return True if the panel is hidden (not visible), False otherwise.");
120 
121 #define _CURSES_PANEL_PANEL_HIDDEN_METHODDEF    \
122     {"hidden", (PyCFunction)_curses_panel_panel_hidden, METH_NOARGS, _curses_panel_panel_hidden__doc__},
123 
124 static PyObject *
125 _curses_panel_panel_hidden_impl(PyCursesPanelObject *self);
126 
127 static PyObject *
_curses_panel_panel_hidden(PyCursesPanelObject * self,PyObject * Py_UNUSED (ignored))128 _curses_panel_panel_hidden(PyCursesPanelObject *self, PyObject *Py_UNUSED(ignored))
129 {
130     return _curses_panel_panel_hidden_impl(self);
131 }
132 
133 PyDoc_STRVAR(_curses_panel_panel_move__doc__,
134 "move($self, y, x, /)\n"
135 "--\n"
136 "\n"
137 "Move the panel to the screen coordinates (y, x).");
138 
139 #define _CURSES_PANEL_PANEL_MOVE_METHODDEF    \
140     {"move", (PyCFunction)(void(*)(void))_curses_panel_panel_move, METH_FASTCALL, _curses_panel_panel_move__doc__},
141 
142 static PyObject *
143 _curses_panel_panel_move_impl(PyCursesPanelObject *self, int y, int x);
144 
145 static PyObject *
_curses_panel_panel_move(PyCursesPanelObject * self,PyObject * const * args,Py_ssize_t nargs)146 _curses_panel_panel_move(PyCursesPanelObject *self, PyObject *const *args, Py_ssize_t nargs)
147 {
148     PyObject *return_value = NULL;
149     int y;
150     int x;
151 
152     if (!_PyArg_CheckPositional("move", nargs, 2, 2)) {
153         goto exit;
154     }
155     if (PyFloat_Check(args[0])) {
156         PyErr_SetString(PyExc_TypeError,
157                         "integer argument expected, got float" );
158         goto exit;
159     }
160     y = _PyLong_AsInt(args[0]);
161     if (y == -1 && PyErr_Occurred()) {
162         goto exit;
163     }
164     if (PyFloat_Check(args[1])) {
165         PyErr_SetString(PyExc_TypeError,
166                         "integer argument expected, got float" );
167         goto exit;
168     }
169     x = _PyLong_AsInt(args[1]);
170     if (x == -1 && PyErr_Occurred()) {
171         goto exit;
172     }
173     return_value = _curses_panel_panel_move_impl(self, y, x);
174 
175 exit:
176     return return_value;
177 }
178 
179 PyDoc_STRVAR(_curses_panel_panel_window__doc__,
180 "window($self, /)\n"
181 "--\n"
182 "\n"
183 "Return the window object associated with the panel.");
184 
185 #define _CURSES_PANEL_PANEL_WINDOW_METHODDEF    \
186     {"window", (PyCFunction)_curses_panel_panel_window, METH_NOARGS, _curses_panel_panel_window__doc__},
187 
188 static PyObject *
189 _curses_panel_panel_window_impl(PyCursesPanelObject *self);
190 
191 static PyObject *
_curses_panel_panel_window(PyCursesPanelObject * self,PyObject * Py_UNUSED (ignored))192 _curses_panel_panel_window(PyCursesPanelObject *self, PyObject *Py_UNUSED(ignored))
193 {
194     return _curses_panel_panel_window_impl(self);
195 }
196 
197 PyDoc_STRVAR(_curses_panel_panel_replace__doc__,
198 "replace($self, win, /)\n"
199 "--\n"
200 "\n"
201 "Change the window associated with the panel to the window win.");
202 
203 #define _CURSES_PANEL_PANEL_REPLACE_METHODDEF    \
204     {"replace", (PyCFunction)_curses_panel_panel_replace, METH_O, _curses_panel_panel_replace__doc__},
205 
206 static PyObject *
207 _curses_panel_panel_replace_impl(PyCursesPanelObject *self,
208                                  PyCursesWindowObject *win);
209 
210 static PyObject *
_curses_panel_panel_replace(PyCursesPanelObject * self,PyObject * arg)211 _curses_panel_panel_replace(PyCursesPanelObject *self, PyObject *arg)
212 {
213     PyObject *return_value = NULL;
214     PyCursesWindowObject *win;
215 
216     if (!PyObject_TypeCheck(arg, &PyCursesWindow_Type)) {
217         _PyArg_BadArgument("replace", "argument", (&PyCursesWindow_Type)->tp_name, arg);
218         goto exit;
219     }
220     win = (PyCursesWindowObject *)arg;
221     return_value = _curses_panel_panel_replace_impl(self, win);
222 
223 exit:
224     return return_value;
225 }
226 
227 PyDoc_STRVAR(_curses_panel_panel_set_userptr__doc__,
228 "set_userptr($self, obj, /)\n"
229 "--\n"
230 "\n"
231 "Set the panel\'s user pointer to obj.");
232 
233 #define _CURSES_PANEL_PANEL_SET_USERPTR_METHODDEF    \
234     {"set_userptr", (PyCFunction)_curses_panel_panel_set_userptr, METH_O, _curses_panel_panel_set_userptr__doc__},
235 
236 PyDoc_STRVAR(_curses_panel_panel_userptr__doc__,
237 "userptr($self, /)\n"
238 "--\n"
239 "\n"
240 "Return the user pointer for the panel.");
241 
242 #define _CURSES_PANEL_PANEL_USERPTR_METHODDEF    \
243     {"userptr", (PyCFunction)_curses_panel_panel_userptr, METH_NOARGS, _curses_panel_panel_userptr__doc__},
244 
245 static PyObject *
246 _curses_panel_panel_userptr_impl(PyCursesPanelObject *self);
247 
248 static PyObject *
_curses_panel_panel_userptr(PyCursesPanelObject * self,PyObject * Py_UNUSED (ignored))249 _curses_panel_panel_userptr(PyCursesPanelObject *self, PyObject *Py_UNUSED(ignored))
250 {
251     return _curses_panel_panel_userptr_impl(self);
252 }
253 
254 PyDoc_STRVAR(_curses_panel_bottom_panel__doc__,
255 "bottom_panel($module, /)\n"
256 "--\n"
257 "\n"
258 "Return the bottom panel in the panel stack.");
259 
260 #define _CURSES_PANEL_BOTTOM_PANEL_METHODDEF    \
261     {"bottom_panel", (PyCFunction)_curses_panel_bottom_panel, METH_NOARGS, _curses_panel_bottom_panel__doc__},
262 
263 static PyObject *
264 _curses_panel_bottom_panel_impl(PyObject *module);
265 
266 static PyObject *
_curses_panel_bottom_panel(PyObject * module,PyObject * Py_UNUSED (ignored))267 _curses_panel_bottom_panel(PyObject *module, PyObject *Py_UNUSED(ignored))
268 {
269     return _curses_panel_bottom_panel_impl(module);
270 }
271 
272 PyDoc_STRVAR(_curses_panel_new_panel__doc__,
273 "new_panel($module, win, /)\n"
274 "--\n"
275 "\n"
276 "Return a panel object, associating it with the given window win.");
277 
278 #define _CURSES_PANEL_NEW_PANEL_METHODDEF    \
279     {"new_panel", (PyCFunction)_curses_panel_new_panel, METH_O, _curses_panel_new_panel__doc__},
280 
281 static PyObject *
282 _curses_panel_new_panel_impl(PyObject *module, PyCursesWindowObject *win);
283 
284 static PyObject *
_curses_panel_new_panel(PyObject * module,PyObject * arg)285 _curses_panel_new_panel(PyObject *module, PyObject *arg)
286 {
287     PyObject *return_value = NULL;
288     PyCursesWindowObject *win;
289 
290     if (!PyObject_TypeCheck(arg, &PyCursesWindow_Type)) {
291         _PyArg_BadArgument("new_panel", "argument", (&PyCursesWindow_Type)->tp_name, arg);
292         goto exit;
293     }
294     win = (PyCursesWindowObject *)arg;
295     return_value = _curses_panel_new_panel_impl(module, win);
296 
297 exit:
298     return return_value;
299 }
300 
301 PyDoc_STRVAR(_curses_panel_top_panel__doc__,
302 "top_panel($module, /)\n"
303 "--\n"
304 "\n"
305 "Return the top panel in the panel stack.");
306 
307 #define _CURSES_PANEL_TOP_PANEL_METHODDEF    \
308     {"top_panel", (PyCFunction)_curses_panel_top_panel, METH_NOARGS, _curses_panel_top_panel__doc__},
309 
310 static PyObject *
311 _curses_panel_top_panel_impl(PyObject *module);
312 
313 static PyObject *
_curses_panel_top_panel(PyObject * module,PyObject * Py_UNUSED (ignored))314 _curses_panel_top_panel(PyObject *module, PyObject *Py_UNUSED(ignored))
315 {
316     return _curses_panel_top_panel_impl(module);
317 }
318 
319 PyDoc_STRVAR(_curses_panel_update_panels__doc__,
320 "update_panels($module, /)\n"
321 "--\n"
322 "\n"
323 "Updates the virtual screen after changes in the panel stack.\n"
324 "\n"
325 "This does not call curses.doupdate(), so you\'ll have to do this yourself.");
326 
327 #define _CURSES_PANEL_UPDATE_PANELS_METHODDEF    \
328     {"update_panels", (PyCFunction)_curses_panel_update_panels, METH_NOARGS, _curses_panel_update_panels__doc__},
329 
330 static PyObject *
331 _curses_panel_update_panels_impl(PyObject *module);
332 
333 static PyObject *
_curses_panel_update_panels(PyObject * module,PyObject * Py_UNUSED (ignored))334 _curses_panel_update_panels(PyObject *module, PyObject *Py_UNUSED(ignored))
335 {
336     return _curses_panel_update_panels_impl(module);
337 }
338 /*[clinic end generated code: output=d96dc1fd68e898d9 input=a9049054013a1b77]*/
339