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