orxncurses.cpp
Go to the documentation of this file.
1 /*----------------------------------------------------------------------------*/
2 /* */
3 /* Copyright (c) 2010-2021 Rexx Language Association. All rights reserved. */
4 /* */
5 /* This program and the accompanying materials are made available under */
6 /* the terms of the Common Public License v1.0 which accompanies this */
7 /* distribution. A copy is also available at the following address: */
8 /* https://www.oorexx.org/license.html */
9 /* */
10 /* Redistribution and use in source and binary forms, with or */
11 /* without modification, are permitted provided that the following */
12 /* conditions are met: */
13 /* */
14 /* Redistributions of source code must retain the above copyright */
15 /* notice, this list of conditions and the following disclaimer. */
16 /* Redistributions in binary form must reproduce the above copyright */
17 /* notice, this list of conditions and the following disclaimer in */
18 /* the documentation and/or other materials provided with the distribution. */
19 /* */
20 /* Neither the name of Rexx Language Association nor the names */
21 /* of its contributors may be used to endorse or promote products */
22 /* derived from this software without specific prior written permission. */
23 /* */
24 /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
25 /* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
26 /* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */
27 /* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
28 /* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
29 /* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */
30 /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */
31 /* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */
32 /* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
33 /* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
34 /* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
35 /* */
36 /*----------------------------------------------------------------------------*/
37 
38 #ifdef HAVE_CONFIG_H
39 # include "config.h"
40 #endif
41 
42 #include <oorexxapi.h>
43 #if defined CURSES_HAVE_NCURSES_H
44 #include <ncurses.h>
45 #elif defined CURSES_HAVE_NCURSES_NCURSES_H
46 #include <ncurses/ncurses.h>
47 #else
48 #include <curses.h>
49 #endif
50 
51 /*----------------------------------------------------------------------------*/
52 /* Local Definitions/variables */
53 /*----------------------------------------------------------------------------*/
54 
55 #define VERSTRING(major,minor,rel) #major "." #minor "." #rel
56 
57 bool onebased = true;
58 #define ADDONE(x) (onebased ? x + 1 : x)
59 #define SUBTRACTONE(x) (onebased ? x - 1 : x)
60 
61 /*============================================================================*/
62 /* Public Methods */
63 /*============================================================================*/
64 
65 /**
66  * Method: OrxCurVersion
67  *
68  * Return the OrxnCurses version string.
69  *
70  * @return Zero.
71  **/
72 RexxMethod0(RexxObjectPtr, // Return type
73  OrxCurVersion) // Object_method name
74 {
75 
76  return (RexxObjectPtr)context->NewStringFromAsciiz(VERSTRING(VMAJOR, VMINOR, VREL));
77 }
78 
79 /**
80  * Method: OrxCurSetBase
81  *
82  * Set whether or not the library uses one-based indexes or
83  * zero-based indexes. The default is one-based.
84  *
85  * @param base 1 = one-based, 0 = zero-based
86  *
87  * @return base.
88  **/
89 RexxMethod1(logical_t, // Return type
90  OrxCurSetBase, // Object_method name
91  OPTIONAL_logical_t, base)
92 {
93 
94  if (argumentExists(1)) {
95  onebased = base;
96  }
97  return onebased;
98 }
99 
100 /**
101  * Method: OrxCurInitscr
102  *
103  * Init the standard screen..
104  *
105  * @return Zero.
106  **/
107 RexxMethod0(POINTER, // Return type
108  OrxCurInitscr) // Object_method name
109 {
110 
111  initscr();
112  context->SetObjectVariable("CSELF", context->NewPointer(stdscr));
113  return context->NewPointer(stdscr);
114 }
115 
116 /**
117  * Method: OrxCurNewwin
118  *
119  * Create a new window.
120  *
121  * @param nlines Number of lines.
122  *
123  * @param ncols Number of columns.
124  *
125  * @param begin_y Y position start position.
126  *
127  * @param begin_x X position start position.
128  *
129  * @return Zero.
130  **/
131 RexxMethod4(int, // Return type
132  OrxCurNewwin, // Object_method name
133  int, nlines,
134  int, ncols,
135  int, begin_y,
136  int, begin_x)
137 {
138 
139  context->SetObjectVariable("CSELF", context->NewPointer(newwin(nlines, ncols,
140  SUBTRACTONE(begin_y),
141  SUBTRACTONE(begin_x))));
142  return 0;
143 }
144 
145 /**
146  * Method: OrxCurNewwinfromptr
147  *
148  * Create a new window.
149  *
150  * @param ptr Pointer to the window.
151  *
152  * @return Zero.
153  **/
154 RexxMethod1(RexxObjectPtr, // Return type
155  OrxCurNewwinfromptr, // Object_method name
156  POINTER, ptr)
157 {
158 
159  context->SetObjectVariable("CSELF", context->NewPointer(ptr));
160  return 0;
161 }
162 
163 /**
164  * Method: OrxCurEndwin
165  *
166  * End nCurses formatting.
167  *
168  * @return Zero.
169  **/
170 RexxMethod0(int, // Return type
171  OrxCurEndwin) // Object_method name
172 {
173 
174  return endwin();
175 }
176 
177 /**
178  * Method: OrxCurRefresh
179  *
180  * Refresh the screen and turn nCurses formatting on.
181  *
182  * @return Zero.
183  **/
184 RexxMethod1(int, // Return type
185  OrxCurRefresh, // Object_method name
186  CSELF, cself) // Self
187 {
188 
189  if (cself == NULL) {
190  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
191  context->WholeNumberToObject(1),
192  context->NewStringFromAsciiz("Window"));
193  return 0;
194  }
195  return wrefresh((WINDOW *)cself);
196 }
197 
198 /**
199  * Method: OrxCurAddch
200  *
201  * Add a single character to the screen.
202  *
203  * @param str Character to be added.
204  *
205  * @return Zero.
206  **/
207 RexxMethod2(int, // Return type
208  OrxCurAddch, // Object_method name
209  CSTRING, str, // Character
210  CSELF, cself) // Self
211 {
212 
213  if (cself == NULL) {
214  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
215  context->WholeNumberToObject(1),
216  context->NewStringFromAsciiz("Window"));
217  return 0;
218  }
219  return waddch((WINDOW *)cself, *str);
220 }
221 
222 /**
223  * Method: OrxCurMvaddch
224  *
225  * Add a single character to the screen after moving the cursor.
226  *
227  * @param y Y position.
228  *
229  * @param x X position.
230  *
231  * @param str Character to be added.
232  *
233  * @return Zero.
234  **/
235 RexxMethod4(int, // Return type
236  OrxCurMvaddch, // Object_method name
237  int, y, // Y position
238  int, x, // X position
239  CSTRING, str, // Character
240  CSELF, cself) // Self
241 {
242 
243  if (cself == NULL) {
244  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
245  context->WholeNumberToObject(1),
246  context->NewStringFromAsciiz("Window"));
247  return 0;
248  }
249  return mvwaddch((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x), *str);
250 }
251 
252 /**
253  * Method: OrxCurAddchstr
254  *
255  * Add a chtype character string to the screen.
256  *
257  * @param str String to be added.
258  *
259  * @return Zero.
260  **/
261 RexxMethod2(int, // Return type
262  OrxCurAddchstr, // Object_method name
263  CSTRING, str, // Character
264  CSELF, cself) // Self
265 {
266 
267  if (cself == NULL) {
268  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
269  context->WholeNumberToObject(1),
270  context->NewStringFromAsciiz("Window"));
271  return 0;
272  }
273  return waddchstr((WINDOW *)cself, (const chtype *)str);
274 }
275 
276 /**
277  * Method: OrxCurMvaddchstr
278  *
279  * Add a chtype character string to the screen after moving the
280  * cursor.
281  *
282  * @param y Y position.
283  *
284  * @param x X position.
285  *
286  * @param str String to be added.
287  *
288  * @return Zero.
289  **/
290 RexxMethod4(int, // Return type
291  OrxCurMvaddchstr, // Object_method name
292  int, y, // Y position
293  int, x, // X position
294  CSTRING, str, // Character
295  CSELF, cself) // Self
296 {
297 
298  if (cself == NULL) {
299  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
300  context->WholeNumberToObject(1),
301  context->NewStringFromAsciiz("Window"));
302  return 0;
303  }
304  return mvwaddchstr((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x), (const chtype *)str);
305 }
306 
307 /**
308  * Method: OrxCurAddchnstr
309  *
310  * Add a chtype character string to the screen.
311  *
312  * @param str String to be added.
313  *
314  * @param n Number of characters to add.
315  *
316  * @return Zero.
317  **/
318 RexxMethod3(int, // Return type
319  OrxCurAddchnstr, // Object_method name
320  CSTRING, str, // Character
321  int, n, // Number of characters
322  CSELF, cself) // Self
323 {
324 
325  if (cself == NULL) {
326  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
327  context->WholeNumberToObject(1),
328  context->NewStringFromAsciiz("Window"));
329  return 0;
330  }
331  return waddchnstr((WINDOW *)cself, (const chtype *)str, n);
332 }
333 
334 /**
335  * Method: OrxCurMvaddchnstr
336  *
337  * Add a chtype character string to the screen after moving the
338  * cursor.
339  *
340  * @param y Y position.
341  *
342  * @param x X position.
343  *
344  * @param str String to be added.
345  *
346  * @param n Number of characters to add.
347  *
348  * @return Zero.
349  **/
350 RexxMethod5(int, // Return type
351  OrxCurMvaddchnstr, // Object_method name
352  int, y, // Y position
353  int, x, // X position
354  CSTRING, str, // Character
355  int, n, // Number of characters
356  CSELF, cself) // Self
357 {
358 
359  if (cself == NULL) {
360  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
361  context->WholeNumberToObject(1),
362  context->NewStringFromAsciiz("Window"));
363  return 0;
364  }
365  return mvwaddchnstr((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x), (const chtype *)str, n);
366 }
367 
368 /**
369  * Method: OrxCurAddstr
370  *
371  * Add a character string to the screen.
372  *
373  * @param str String to be added.
374  *
375  * @return Zero.
376  **/
377 RexxMethod2(int, // Return type
378  OrxCurAddstr, // Object_method name
379  CSTRING, str, // Character
380  CSELF, cself) // Self
381 {
382 
383  if (cself == NULL) {
384  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
385  context->WholeNumberToObject(1),
386  context->NewStringFromAsciiz("Window"));
387  return 0;
388  }
389  return waddstr((WINDOW *)cself, str);
390 }
391 
392 /**
393  * Method: OrxCurMvaddstr
394  *
395  * Add a character string to the screen after moving the cursor.
396  *
397  * @param y Y position.
398  *
399  * @param x X position.
400  *
401  * @param str String to be added.
402  *
403  * @return Zero.
404  **/
405 RexxMethod4(int, // Return type
406  OrxCurMvaddstr, // Object_method name
407  int, y, // Y position
408  int, x, // X position
409  CSTRING, str, // Character
410  CSELF, cself) // Self
411 {
412 
413  if (cself == NULL) {
414  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
415  context->WholeNumberToObject(1),
416  context->NewStringFromAsciiz("Window"));
417  return 0;
418  }
419  return mvwaddstr((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x), str);
420 }
421 
422 /**
423  * Method: OrxCurAddnstr
424  *
425  * Add a character string to the screen.
426  *
427  * @param str String to be added.
428  *
429  * @param n Number of characters to add.
430  *
431  * @return Zero.
432  **/
433 RexxMethod3(int, // Return type
434  OrxCurAddnstr, // Object_method name
435  CSTRING, str, // Character
436  int, n, // Number of characters
437  CSELF, cself) // Self
438 {
439 
440  if (cself == NULL) {
441  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
442  context->WholeNumberToObject(1),
443  context->NewStringFromAsciiz("Window"));
444  return 0;
445  }
446  return waddnstr((WINDOW *)cself, str, n);
447 }
448 
449 /**
450  * Method: OrxCurMvaddnstr
451  *
452  * Add a character string to the screen after moving the cursor.
453  *
454  * @param y Y position.
455  *
456  * @param x X position.
457  *
458  * @param str String to be added.
459  *
460  * @param n Number of characters to add.
461  *
462  * @return Zero.
463  **/
464 RexxMethod5(int, // Return type
465  OrxCurMvaddnstr, // Object_method name
466  int, y, // Y position
467  int, x, // X position
468  CSTRING, str, // Character
469  int, n, // Number of characters
470  CSELF, cself) // Self
471 {
472 
473  if (cself == NULL) {
474  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
475  context->WholeNumberToObject(1),
476  context->NewStringFromAsciiz("Window"));
477  return 0;
478  }
479  return mvwaddnstr((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x), str, n);
480 }
481 
482 /**
483  * Method: OrxCurAssume_default_colors
484  *
485  * Set default colors.
486  *
487  * @param fg Forground color.
488  *
489  * @param bg Background color.
490  *
491  * @return Zero.
492  **/
493 RexxMethod2(int, // Return type
494  OrxCurAssume_default_colors, // Object_method name
495  int, fg, // fg color
496  int, bg) // bg color
497 {
498 
499  return assume_default_colors(fg, bg);
500 }
501 
502 /**
503  * Method: OrxCurAttroff
504  *
505  * Turn off one or more attributes.
506  *
507  * @param attr Attribute(s).
508  *
509  * @return Zero.
510  **/
511 RexxMethod2(int, // Return type
512  OrxCurAttroff, // Object_method name
513  int, attr, // Attribute(s)
514  CSELF, cself) // Self
515 {
516 
517  if (cself == NULL) {
518  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
519  context->WholeNumberToObject(1),
520  context->NewStringFromAsciiz("Window"));
521  return 0;
522  }
523  return wattroff((WINDOW *)cself, attr);
524 }
525 
526 /**
527  * Method: OrxCurAttron
528  *
529  * Turn on one or more attributes.
530  *
531  * @param attr Attribute(s).
532  *
533  * @return Zero.
534  **/
535 RexxMethod2(int, // Return type
536  OrxCurAttron, // Object_method name
537  int, attr, // Attribute(s)
538  CSELF, cself) // Self
539 {
540 
541  if (cself == NULL) {
542  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
543  context->WholeNumberToObject(1),
544  context->NewStringFromAsciiz("Window"));
545  return 0;
546  }
547  return wattron((WINDOW *)cself, attr);
548 }
549 
550 /**
551  * Method: OrxCurAttrset
552  *
553  * Turn on one or more attributes.
554  *
555  * @param attr Attribute(s).
556  *
557  * @return Zero.
558  **/
559 RexxMethod2(int, // Return type
560  OrxCurAttrset, // Object_method name
561  int, attr, // Attribute(s)
562  CSELF, cself) // Self
563 {
564 
565  if (cself == NULL) {
566  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
567  context->WholeNumberToObject(1),
568  context->NewStringFromAsciiz("Window"));
569  return 0;
570  }
571  return wattrset((WINDOW *)cself, attr);
572 }
573 
574 /**
575  * Method: OrxCurBaudrate
576  *
577  * Return the terminal baud rate.
578  *
579  * @return Zero.
580  **/
581 RexxMethod0(int, // Return type
582  OrxCurBaudrate) // Object_method name
583 {
584 
585  return baudrate();
586 }
587 
588 /**
589  * Method: OrxCurBeep
590  *
591  * Beep the terminal.
592  *
593  * @return Zero.
594  **/
595 RexxMethod0(int, // Return type
596  OrxCurBeep) // Object_method name
597 {
598 
599  return beep();
600 }
601 
602 /**
603  * Method: OrxCurBkgd
604  *
605  * Set backgroung attributes for the whole screen.
606  *
607  * @param attr Attribute(s).
608  *
609  * @return Zero.
610  **/
611 RexxMethod2(int, // Return type
612  OrxCurBkgd, // Object_method name
613  int, attr, // Attribute(s)
614  CSELF, cself) // Self
615 {
616 
617  if (cself == NULL) {
618  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
619  context->WholeNumberToObject(1),
620  context->NewStringFromAsciiz("Window"));
621  return 0;
622  }
623  return wbkgd((WINDOW *)cself, (chtype)attr);
624 }
625 
626 /**
627  * Method: OrxCurBkgdset
628  *
629  * Set backgroung attributes for the next output text.
630  *
631  * @param attr Attribute(s).
632  *
633  * @return Zero.
634  **/
635 RexxMethod2(int, // Return type
636  OrxCurBkgdset, // Object_method name
637  int, attr, // Attribute(s)
638  CSELF, cself) // Self
639 {
640 
641  if (cself == NULL) {
642  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
643  context->WholeNumberToObject(1),
644  context->NewStringFromAsciiz("Window"));
645  return 0;
646  }
647  wbkgdset((WINDOW *)cself, (chtype)attr);
648  return 0;
649 }
650 
651 /**
652  * Method: OrxCurBorder
653  *
654  * Set window border.
655  *
656  * @param ls Left side character.
657  *
658  * @param rs Right side character.
659  *
660  * @param ts Top side character.
661  *
662  * @param bs Bottom side character.
663  *
664  * @param tl Top/Left character.
665  *
666  * @param tr Top/Right character.
667  *
668  * @param bl Bottom/Left character.
669  *
670  * @param br Bottom/Right character.
671  *
672  * @return Zero.
673  **/
674 RexxMethod9(int, // Return type
675  OrxCurBorder, // Object_method name
676  int, ls,
677  int, rs,
678  int, ts,
679  int, bs,
680  int, tl,
681  int, tr,
682  int, bl,
683  int, br,
684  CSELF, cself) // Self
685 {
686 
687  if (cself == NULL) {
688  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
689  context->WholeNumberToObject(1),
690  context->NewStringFromAsciiz("Window"));
691  return 0;
692  }
693  return wborder((WINDOW *)cself, (chtype)ls, (chtype)rs, (chtype)ts, (chtype)bs,
694  (chtype)tl, (chtype)tr, (chtype)bl, (chtype)br);
695 }
696 
697 /**
698  * Method: OrxCurAcs_map
699  *
700  * Return an ACS character.
701  *
702  * @param str Character.
703  *
704  * @return Zero.
705  **/
706 RexxMethod1(int, // Return type
707  OrxCurAcs_map, // Object_method name
708  CSTRING, str)
709 {
710 
711  return (int) NCURSES_ACS(*str);
712 }
713 
714 /**
715  * Method: OrxCurBox
716  *
717  * Draw a box around the edges of a window.
718  *
719  * @param str Vertical character.
720  *
721  * @param str Horizontal character.
722  *
723  * @return Zero.
724  **/
725 RexxMethod3(int, // Return type
726  OrxCurBox, // Object_method name
727  int, verch,
728  int, horch,
729  CSELF, cself) // Self
730 {
731 
732  if (cself == NULL) {
733  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
734  context->WholeNumberToObject(1),
735  context->NewStringFromAsciiz("Window"));
736  return 0;
737  }
738  return box((WINDOW *)cself, (chtype)verch, (chtype)horch);
739 }
740 
741 /**
742  * Method: OrxCurCan_change_color
743  *
744  * Returns whether or not a terminal can changes its color set.
745  *
746  * @return Zero.
747  **/
748 RexxMethod0(int, // Return type
749  OrxCurCan_change_color) // Object_method name
750 {
751 
752  return (int) can_change_color();
753 }
754 
755 /**
756  * Method: OrxCurCbreak
757  *
758  * Activates cbreak (buffering) mode.
759  *
760  * @return Zero.
761  **/
762 RexxMethod0(int, // Return type
763  OrxCurCbreak) // Object_method name
764 {
765 
766  return cbreak();
767 }
768 
769 /**
770  * Method: OrxCurNocbreak
771  *
772  * Deactivates cbreak (buffering) mode.
773  *
774  * @return Zero.
775  **/
776 RexxMethod0(int, // Return type
777  OrxCurNocbreak) // Object_method name
778 {
779 
780  return nocbreak();
781 }
782 
783 /**
784  * Method: OrxCurChgat
785  *
786  * Chage attributes on the window.
787  *
788  * @param n Number of character positions.
789  *
790  * @param attr The attribute.
791  *
792  * @param color The COLOR_PAIR number.
793  *
794  * @return Zero.
795  **/
796 RexxMethod4(int, // Return type
797  OrxCurChgat, // Object_method name
798  int, n,
799  int, attr,
800  int, color,
801  CSELF, cself) // Self
802 {
803 
804  if (cself == NULL) {
805  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
806  context->WholeNumberToObject(1),
807  context->NewStringFromAsciiz("Window"));
808  return 0;
809  }
810  return wchgat((WINDOW *)cself, n, (attr_t)attr, (short)SUBTRACTONE(color), NULL);
811 }
812 
813 /**
814  * Method: OrxCurMvchgat
815  *
816  * Chage attributes on the window after moving the cursor.
817  *
818  * @param y Y start position.
819  *
820  * @param x X start position.
821  *
822  * @param n Number of character positions.
823  *
824  * @param attr The attribute.
825  *
826  * @param color The COLOR_PAIR number.
827  *
828  * @return Zero.
829  **/
830 RexxMethod6(int, // Return type
831  OrxCurMvchgat, // Object_method name
832  int, y,
833  int, x,
834  int, n,
835  int, attr,
836  int, color,
837  CSELF, cself) // Self
838 {
839 
840  if (cself == NULL) {
841  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
842  context->WholeNumberToObject(1),
843  context->NewStringFromAsciiz("Window"));
844  return 0;
845  }
846  return mvwchgat((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x), n, (attr_t)attr,
847  (short)SUBTRACTONE(color), NULL);
848 }
849 
850 /**
851  * Method: OrxCurClear
852  *
853  * Clear the window.
854  *
855  * @return Zero.
856  **/
857 RexxMethod1(int, // Return type
858  OrxCurClear, // Object_method name
859  CSELF, cself) // Self
860 {
861 
862  if (cself == NULL) {
863  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
864  context->WholeNumberToObject(1),
865  context->NewStringFromAsciiz("Window"));
866  return 0;
867  }
868  return wclear((WINDOW *)cself);
869 }
870 
871 /**
872  * Method: OrxCurClearok
873  *
874  * Force a repaint of the window on the next refresh call.
875  *
876  * @param bf Boolean on/off
877  *
878  * @return Zero.
879  **/
880 RexxMethod2(int, // Return type
881  OrxCurClearok, // Object_method name
882  logical_t, bf,
883  CSELF, cself) // Self
884 {
885 
886  if (cself == NULL) {
887  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
888  context->WholeNumberToObject(1),
889  context->NewStringFromAsciiz("Window"));
890  return 0;
891  }
892  return clearok((WINDOW *)cself, bf);
893 }
894 
895 /**
896  * Method: OrxCurClrtobot
897  *
898  * Clear the window from the current cursor position.
899  *
900  * @return Zero.
901  **/
902 RexxMethod1(int, // Return type
903  OrxCurClrtobot, // Object_method name
904  CSELF, cself) // Self
905 {
906 
907  if (cself == NULL) {
908  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
909  context->WholeNumberToObject(1),
910  context->NewStringFromAsciiz("Window"));
911  return 0;
912  }
913  return wclrtobot((WINDOW *)cself);
914 }
915 
916 /**
917  * Method: OrxCurClrtoeol
918  *
919  * Clear the line from the current cursor position.
920  *
921  * @return Zero.
922  **/
923 RexxMethod1(int, // Return type
924  OrxCurClrtoeol, // Object_method name
925  CSELF, cself) // Self
926 {
927 
928  if (cself == NULL) {
929  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
930  context->WholeNumberToObject(1),
931  context->NewStringFromAsciiz("Window"));
932  return 0;
933  }
934  return wclrtoeol((WINDOW *)cself);
935 }
936 
937 /**
938  * Method: OrxCurColor_set
939  *
940  * Sets foreground and background text color.
941  *
942  * @param num COLOR_PAIR number.
943  *
944  * @return Zero.
945  **/
946 RexxMethod1(int, // Return type
947  OrxCurColor_set, // Object_method name
948  int, num)
949 {
950 
951  // don't use the SUBTRACTONE macro on num!
952  return color_set((short)num, NULL);
953 }
954 
955 /**
956  * Method: OrxCurColors
957  *
958  * Returns the number of possible COLORs.
959  *
960  * @return Zero.
961  **/
962 RexxMethod0(int, // Return type
963  OrxCurColors) // Object_method name
964 {
965 
966  return (int) COLORS;
967 }
968 
969 /**
970  * Method: OrxCurColor_pair
971  *
972  * Returns the number of possible COLOR_PAIR attribute.
973  *
974  * @return Zero.
975  **/
976 RexxMethod1(int, // Return type
977  OrxCurColor_pair, // Object_method name
978  int, num)
979 {
980 
981  return (int) COLOR_PAIR(num);
982 }
983 
984 /**
985  * Method: OrxCurColor_pairs
986  *
987  * Returns the number of possible COLOR_PAIRS.
988  *
989  * @return Zero.
990  **/
991 RexxMethod0(int, // Return type
992  OrxCurColor_pairs) // Object_method name
993 {
994 
995  return (int) COLOR_PAIRS;
996 }
997 
998 /**
999  * Method: OrxCurCols
1000  *
1001  * Returns the number of columns on the stdscr.
1002  *
1003  * @return Zero.
1004  **/
1005 RexxMethod0(int, // Return type
1006  OrxCurCols) // Object_method name
1007 {
1008 
1009  return (int) COLS;
1010 }
1011 
1012 /**
1013  * Method: OrxCurCopywin
1014  *
1015  * Copy a rectangle from one window to self.
1016  *
1017  * @param swin Source window.
1018  *
1019  * @param sminrow Source min row number.
1020  *
1021  * @param smincol Source min col number.
1022  *
1023  * @param dminrow Destination min row number.
1024  *
1025  * @param dmincol Destination min col number.
1026  *
1027  * @param dmaxrow Destination max row number.
1028  *
1029  * @param dmaxcol Destination max col number.
1030  *
1031  * @param overlay Boolean yes/no to overlay destination text.
1032  *
1033  * @return Zero.
1034  **/
1035 RexxMethod9(int, // Return type
1036  OrxCurCopywin, // Object_method name
1037  RexxObjectPtr, swin,
1038  int, sminrow,
1039  int, smincol,
1040  int, dminrow,
1041  int, dmincol,
1042  int, dmaxrow,
1043  int, dmaxcol,
1044  logical_t, overlay,
1045  CSELF, cself) // Self
1046 {
1047 
1048  if (cself == NULL) {
1049  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1050  context->WholeNumberToObject(1),
1051  context->NewStringFromAsciiz("Window"));
1052  return 0;
1053  }
1054  return copywin((WINDOW *)context->ObjectToCSelf(swin), (WINDOW *)cself,
1055  SUBTRACTONE(sminrow), SUBTRACTONE(smincol), SUBTRACTONE(dminrow),
1056  SUBTRACTONE(dmincol), SUBTRACTONE(dmaxrow), SUBTRACTONE(dmaxcol),
1057  (int)overlay);
1058 }
1059 
1060 /**
1061  * Method: OrxCurCurs_set
1062  *
1063  * Control the cursor visibility.
1064  *
1065  * @param vis Visibility boolean.
1066  *
1067  * @return Zero.
1068  **/
1069 RexxMethod1(int, // Return type
1070  OrxCurCurs_set, // Object_method name
1071  int, vis)
1072 {
1073 
1074  return curs_set(vis);
1075 }
1076 
1077 /**
1078  * Method: OrxCurCurses_version
1079  *
1080  * Return the nCurses version string.
1081  *
1082  * @return Zero.
1083  **/
1085  OrxCurCurses_version) // Object_method name
1086 {
1087 
1088  return (RexxObjectPtr)context->NewStringFromAsciiz(curses_version());
1089 }
1090 
1091 /**
1092  * Method: OrxCurDelch
1093  *
1094  * Delete the character under the cursor and slide remaining
1095  * characters on the line one position to the left.
1096  *
1097  * @return Zero.
1098  **/
1099 RexxMethod1(int, // Return type
1100  OrxCurDelch, // Object_method name
1101  CSELF, cself) // Self
1102 {
1103 
1104  if (cself == NULL) {
1105  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1106  context->WholeNumberToObject(1),
1107  context->NewStringFromAsciiz("Window"));
1108  return 0;
1109  }
1110  return wdelch((WINDOW *)cself);
1111 }
1112 
1113 /**
1114  * Method: OrxCurDeleteln
1115  *
1116  * Delete the line under the cursor and slide remaining lines
1117  * below the cursor up one line.
1118  *
1119  * @return Zero.
1120  **/
1121 RexxMethod1(int, // Return type
1122  OrxCurDeleteln, // Object_method name
1123  CSELF, cself) // Self
1124 {
1125 
1126  if (cself == NULL) {
1127  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1128  context->WholeNumberToObject(1),
1129  context->NewStringFromAsciiz("Window"));
1130  return 0;
1131  }
1132  return wdeleteln((WINDOW *)cself);
1133 }
1134 
1135 /**
1136  * Method: OrxCurDelwin
1137  *
1138  * Destroy a window.
1139  *
1140  * @return Zero.
1141  **/
1142 RexxMethod1(int, // Return type
1143  OrxCurDelwin, // Object_method name
1144  CSELF, cself) // Self
1145 {
1146 
1147  if (cself == NULL) {
1148  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1149  context->WholeNumberToObject(1),
1150  context->NewStringFromAsciiz("Window"));
1151  return 0;
1152  }
1153  int retc = delwin((WINDOW *)cself);
1154  if (retc == OK) {
1155  context->SetObjectVariable("CSELF", context->NewPointer(NULL));
1156  }
1157  return retc;
1158 }
1159 
1160 /**
1161  * Method: OrxCurDerwinprivate
1162  *
1163  * Create a derrived window.
1164  *
1165  * @param nlines Number of lines.
1166  *
1167  * @param ncols Number of cols.
1168  *
1169  * @param begy Beginning Y line.
1170  *
1171  * @param begx Beginning X column.
1172  *
1173  * @return Zero.
1174  **/
1176  OrxCurDerwinprivate, // Object_method name
1177  int, nlines,
1178  int, ncols,
1179  int, begy,
1180  int, begx,
1181  CSELF, cself) // Self
1182 {
1183 
1184  WINDOW *ptr = derwin((WINDOW *)cself, nlines, ncols, SUBTRACTONE(begy), SUBTRACTONE(begx));
1185  return (RexxObjectPtr)context->NewPointer(ptr);
1186 }
1187 
1188 /**
1189  * Method: OrxCurDupwinprivate
1190  *
1191  * Duplicate a window.
1192  *
1193  * @return Zero.
1194  **/
1196  OrxCurDupwinprivate, // Object_method name
1197  CSELF, cself) // Self
1198 {
1199 
1200  if (cself == NULL) {
1201  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1202  context->WholeNumberToObject(1),
1203  context->NewStringFromAsciiz("Window"));
1204  return 0;
1205  }
1206  WINDOW *newwin = dupwin((WINDOW *)cself);
1207  return (RexxObjectPtr)context->NewPointer(newwin);
1208 }
1209 
1210 /**
1211  * Method: OrxCurDoupdate
1212  *
1213  * Update the terminal.
1214  *
1215  * @return Zero.
1216  **/
1217 RexxMethod0(int, // Return type
1218  OrxCurDoupdate) // Object_method name
1219 {
1220 
1221  return doupdate();
1222 }
1223 
1224 /**
1225  * Method: OrxCurEcho
1226  *
1227  * Turn on echo.
1228  *
1229  * @return Zero.
1230  **/
1231 RexxMethod0(int, // Return type
1232  OrxCurEcho) // Object_method name
1233 {
1234 
1235  return echo();
1236 }
1237 
1238 /**
1239  * Method: OrxCurNoecho
1240  *
1241  * Turn off echo.
1242  *
1243  * @return Zero.
1244  **/
1245 RexxMethod0(int, // Return type
1246  OrxCurNoecho) // Object_method name
1247 {
1248 
1249  return noecho();
1250 }
1251 
1252 /**
1253  * Method: OrxCurEchochar
1254  *
1255  * Echo one character.
1256  *
1257  * @return Zero.
1258  **/
1259 RexxMethod2(int, // Return type
1260  OrxCurEchochar, // Object_method name
1261  int, ch,
1262  CSELF, cself) // Self
1263 {
1264 
1265  if (cself == NULL) {
1266  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1267  context->WholeNumberToObject(1),
1268  context->NewStringFromAsciiz("Window"));
1269  return 0;
1270  }
1271  return wechochar((WINDOW *)cself, (chtype)ch);
1272 }
1273 
1274 /**
1275  * Method: OrxCurErase
1276  *
1277  * Erase the window.
1278  *
1279  * @return Zero.
1280  **/
1281 RexxMethod1(int, // Return type
1282  OrxCurErase, // Object_method name
1283  CSELF, cself) // Self
1284 {
1285 
1286  if (cself == NULL) {
1287  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1288  context->WholeNumberToObject(1),
1289  context->NewStringFromAsciiz("Window"));
1290  return 0;
1291  }
1292  return werase((WINDOW *)cself);
1293 }
1294 
1295 /**
1296  * Method: OrxCurErasechar
1297  *
1298  * Return the terminal's erase char.
1299  *
1300  * @return Zero.
1301  **/
1303  OrxCurErasechar) // Object_method name
1304 {
1305  char er[2] = {'\0', '\0'};
1306 
1307  er[0] = erasechar();
1308  return (RexxObjectPtr)context->NewStringFromAsciiz(er);
1309 }
1310 
1311 /**
1312  * Method: OrxCurFilter
1313  *
1314  * Restrict output to a single line.
1315  *
1316  * @return Zero.
1317  **/
1318 RexxMethod0(int, // Return type
1319  OrxCurFilter) // Object_method name
1320 {
1321 
1322  filter();
1323  return 0;
1324 }
1325 
1326 /**
1327  * Method: OrxCurFlash
1328  *
1329  * Briefly flash the screen.
1330  *
1331  * @return Zero.
1332  **/
1333 RexxMethod0(int, // Return type
1334  OrxCurFlash) // Object_method name
1335 {
1336 
1337  return flash();
1338 }
1339 
1340 /**
1341  * Method: OrxCurFlushinp
1342  *
1343  * Flush the input queue.
1344  *
1345  * @return Zero.
1346  **/
1347 RexxMethod0(int, // Return type
1348  OrxCurFlushinp) // Object_method name
1349 {
1350 
1351  return flushinp();
1352 }
1353 
1354 /**
1355  * Method: OrxCurGetbegyx
1356  *
1357  * Get the y & x screen coordinate for the top left corner of
1358  * the window.
1359  *
1360  * @return Zero.
1361  **/
1363  OrxCurGetbegyx, // Object_method name
1364  CSELF, cself) // Self
1365 {
1366  char buf[32];
1367  int y, x;
1368 
1369  if (cself == NULL) {
1370  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1371  context->WholeNumberToObject(1),
1372  context->NewStringFromAsciiz("Window"));
1373  return 0;
1374  }
1375  getbegyx((WINDOW *)cself, y, x);
1376  snprintf(buf, sizeof buf, "%d %d", ADDONE(y), ADDONE(x));
1377  return (RexxObjectPtr)context->NewStringFromAsciiz(buf);
1378 }
1379 
1380 /**
1381  * Method: OrxCurGetbkgd
1382  *
1383  * Get the background attribute for the the window.
1384  *
1385  * @return Zero.
1386  **/
1387 RexxMethod1(int, // Return type
1388  OrxCurGetbkgd, // Object_method name
1389  CSELF, cself) // Self
1390 {
1391 
1392  if (cself == NULL) {
1393  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1394  context->WholeNumberToObject(1),
1395  context->NewStringFromAsciiz("Window"));
1396  return 0;
1397  }
1398  return getbkgd((WINDOW *)cself);
1399 }
1400 
1401 /**
1402  * Method: OrxCurGetch
1403  *
1404  * Get character from the keyboard.
1405  *
1406  * @return Zero.
1407  **/
1409  OrxCurGetch, // Object_method name
1410  CSELF, cself) // Self
1411 {
1412  char buf[2] = {'\0', '\0'};
1413  int retc;
1414 
1415  if (cself == NULL) {
1416  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1417  context->WholeNumberToObject(1),
1418  context->NewStringFromAsciiz("Window"));
1419  return 0;
1420  }
1421  retc = wgetch((WINDOW *)cself);
1422  if (retc < 0 || retc > 255) { // return ERR and key codes as numeric strings
1423  return (RexxObjectPtr)context->Int32ToObject(retc);
1424  }
1425  buf[0] = (char)retc;
1426  return (RexxObjectPtr)context->NewStringFromAsciiz(buf);
1427 }
1428 
1429 /**
1430  * Method: OrxCurMvgetch
1431  *
1432  * Get character from the keyboard after moving the cursor.
1433  *
1434  * @return Zero.
1435  **/
1437  OrxCurMvgetch, // Object_method name
1438  int, y,
1439  int, x,
1440  CSELF, cself) // Self
1441 {
1442  char buf[2] = {'\0', '\0'};
1443  int retc;
1444 
1445  if (cself == NULL) {
1446  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1447  context->WholeNumberToObject(1),
1448  context->NewStringFromAsciiz("Window"));
1449  return 0;
1450  }
1451  retc = mvwgetch((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x));
1452  if (retc < 0 || retc > 255) { // return ERR and key codes as numeric strings
1453  return (RexxObjectPtr)context->Int32ToObject(retc);
1454  }
1455  buf[0] = (char)retc;
1456  return (RexxObjectPtr)context->NewStringFromAsciiz(buf);
1457 }
1458 
1459 /**
1460  * Method: OrxCurGetmaxyx
1461  *
1462  * Get the width and height of a window.
1463  *
1464  * @return Zero.
1465  **/
1467  OrxCurGetmaxyx, // Object_method name
1468  CSELF, cself) // Self
1469 {
1470  char buf[32];
1471  int y, x;
1472 
1473  if (cself == NULL) {
1474  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1475  context->WholeNumberToObject(1),
1476  context->NewStringFromAsciiz("Window"));
1477  return 0;
1478  }
1479  getmaxyx((WINDOW *)cself, y, x);
1480  snprintf(buf, sizeof buf, "%d %d", y, x);
1481  return (RexxObjectPtr)context->NewStringFromAsciiz(buf);
1482 }
1483 
1484 /**
1485  * Method: OrxCurGetparyx
1486  *
1487  * Get the width and height of a window relative to the parent
1488  * window.
1489  *
1490  * @return Zero.
1491  **/
1493  OrxCurGetparyx, // Object_method name
1494  CSELF, cself) // Self
1495 {
1496  char buf[32];
1497  int y, x;
1498 
1499  if (cself == NULL) {
1500  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1501  context->WholeNumberToObject(1),
1502  context->NewStringFromAsciiz("Window"));
1503  return 0;
1504  }
1505  getparyx((WINDOW *)cself, y, x);
1506  snprintf(buf, sizeof buf, "%d %d", ADDONE(y), ADDONE(x));
1507  return (RexxObjectPtr)context->NewStringFromAsciiz(buf);
1508 }
1509 
1510 /**
1511  * Method: OrxCurGetmouseprivate
1512  *
1513  * Get a mouse event.
1514  *
1515  * @param ev Mouse event object.
1516  *
1517  * @return Zero.
1518  **/
1519 RexxMethod2(int, // Return type
1520  OrxCurGetmouseprivate, // Object_method name
1521  RexxObjectPtr, ev,
1522  CSELF, cself) // Self
1523 {
1524  MEVENT mevent;
1525 
1526  if (cself == NULL) {
1527  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1528  context->WholeNumberToObject(1),
1529  context->NewStringFromAsciiz("Window"));
1530  return 0;
1531  }
1532  int retc = getmouse(&mevent);
1533  context->SendMessage1(ev, "id=", context->Int32ToObject((int32_t)mevent.id));
1534  context->SendMessage1(ev, "x=", context->Int32ToObject(ADDONE(mevent.x)));
1535  context->SendMessage1(ev, "y=", context->Int32ToObject(ADDONE(mevent.y)));
1536  context->SendMessage1(ev, "z=", context->Int32ToObject(ADDONE(mevent.z)));
1537  context->SendMessage1(ev, "bstate=", context->UnsignedInt32ToObject(mevent.bstate));
1538  return retc;
1539 }
1540 
1541 /**
1542  * Method: OrxCurGetstr
1543  *
1544  * Get a string from the terminal.
1545  *
1546  * @return Zero.
1547  **/
1549  OrxCurGetstr, // Object_method name
1550  CSELF, cself) // Self
1551 {
1552  char buf[1024];
1553 
1554  if (cself == NULL) {
1555  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1556  context->WholeNumberToObject(1),
1557  context->NewStringFromAsciiz("Window"));
1558  return 0;
1559  }
1560  wgetnstr((WINDOW *)cself, buf, sizeof(buf) - 1);
1561  return context->NewStringFromAsciiz(buf);
1562 }
1563 
1564 /**
1565  * Method: OrxCurGetnstr
1566  *
1567  * Get a string from the terminal.
1568  *
1569  * @param n Number of characters to get.
1570  *
1571  * @return Zero.
1572  **/
1574  OrxCurGetnstr, // Object_method name
1575  int, n,
1576  CSELF, cself) // Self
1577 {
1578 
1579  if (cself == NULL) {
1580  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1581  context->WholeNumberToObject(1),
1582  context->NewStringFromAsciiz("Window"));
1583  return 0;
1584  }
1585  char *buf = (char *)malloc(n + 1);
1586  wgetnstr((WINDOW *)cself, buf, n);
1587  RexxObjectPtr tmp = context->NewStringFromAsciiz(buf);
1588  free(buf);
1589  return tmp;
1590 }
1591 
1592 /**
1593  * Method: OrxCurMvgetstr
1594  *
1595  * Get a string from the terminal after moving the cursor.
1596  *
1597  * @param y New Y positions for the cursor.
1598  *
1599  * @param x New X positions for the cursor.
1600  *
1601  * @return Zero.
1602  **/
1604  OrxCurMvgetstr, // Object_method name
1605  int, y,
1606  int, x,
1607  CSELF, cself) // Self
1608 {
1609  char buf[1024];
1610 
1611  if (cself == NULL) {
1612  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1613  context->WholeNumberToObject(1),
1614  context->NewStringFromAsciiz("Window"));
1615  return 0;
1616  }
1617  mvwgetnstr((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x), buf, 1024);
1618  return context->NewStringFromAsciiz(buf);
1619 }
1620 
1621 /**
1622  * Method: OrxCurGetnstr
1623  *
1624  * Get a string from the terminal after moving the cursor.
1625  *
1626  * @param y New Y positions for the cursor.
1627  *
1628  * @param x New X positions for the cursor.
1629  *
1630  * @param n Number of characters to get.
1631  *
1632  * @return Zero.
1633  **/
1635  OrxCurMvgetnstr, // Object_method name
1636  int, y,
1637  int, x,
1638  int, n,
1639  CSELF, cself) // Self
1640 {
1641 
1642  if (cself == NULL) {
1643  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1644  context->WholeNumberToObject(1),
1645  context->NewStringFromAsciiz("Window"));
1646  return 0;
1647  }
1648  char *buf = (char *)malloc(n + 1);
1649  mvwgetnstr((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x), buf, n);
1650  RexxObjectPtr tmp = context->NewStringFromAsciiz(buf);
1651  free(buf);
1652  return tmp;
1653 }
1654 
1655 /**
1656  * Method: OrxCurGetwinprivate
1657  *
1658  * Create a new window from a file.
1659  *
1660  * @param filename File name containing the window information.
1661  *
1662  * @return Zero.
1663  **/
1665  OrxCurGetwinprivate, // Object_method name
1666  CSTRING, filename)
1667 {
1668  FILE *wfile;
1669  WINDOW *win;
1670 
1671  wfile = fopen(filename, "r");
1672  win = getwin(wfile);
1673  fclose(wfile);
1674  return (RexxObjectPtr)context->NewPointer(win);
1675 }
1676 
1677 /**
1678  * Method: OrxCurGetyx
1679  *
1680  * Get the cursor location from a window.
1681  *
1682  * @return Zero.
1683  **/
1685  OrxCurGetyx, // Object_method name
1686  CSELF, cself) // Self
1687 {
1688  char buf[32];
1689  int y, x;
1690 
1691  if (cself == NULL) {
1692  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1693  context->WholeNumberToObject(1),
1694  context->NewStringFromAsciiz("Window"));
1695  return 0;
1696  }
1697  getyx((WINDOW *)cself, y, x);
1698  snprintf(buf, sizeof buf, "%d %d", ADDONE(y), ADDONE(x));
1699  return (RexxObjectPtr)context->NewStringFromAsciiz(buf);
1700 }
1701 
1702 /**
1703  * Method: OrxCurHalfdelay
1704  *
1705  * Simalar to the cbreak method.
1706  *
1707  * @param tenths Tenths of a second.
1708  *
1709  * @return Zero.
1710  **/
1711 RexxMethod1(int, // Return type
1712  OrxCurHalfdelay, // Object_method name
1713  int, tenths)
1714 {
1715 
1716  return halfdelay(tenths);
1717 }
1718 
1719 /**
1720  * Method: OrxCurHas_colors
1721  *
1722  * Determine if the terminal has color support.
1723  *
1724  * @return Zero.
1725  **/
1726 RexxMethod0(logical_t, // Return type
1727  OrxCurHas_colors) // Object_method name
1728 {
1729 
1730  return has_colors();
1731 }
1732 
1733 /**
1734  * Method: OrxCurHas_ic
1735  *
1736  * Determine if the terminal has insert character support.
1737  *
1738  * @return Zero.
1739  **/
1740 RexxMethod0(logical_t, // Return type
1741  OrxCurHas_ic) // Object_method name
1742 {
1743 
1744  return has_ic();
1745 }
1746 
1747 /**
1748  * Method: OrxCurHas_il
1749  *
1750  * Determine if the terminal has insert line support.
1751  *
1752  * @return Zero.
1753  **/
1754 RexxMethod0(logical_t, // Return type
1755  OrxCurHas_il) // Object_method name
1756 {
1757 
1758  return has_il();
1759 }
1760 
1761 /**
1762  * Method: OrxCurHline
1763  *
1764  * Draw a horizontal line.
1765  *
1766  * @param ch Character type (chtype)
1767  *
1768  * @param n Number of characters to draw.
1769  *
1770  * @return Zero.
1771  **/
1772 RexxMethod2(int, // Return type
1773  OrxCurHline, // Object_method name
1774  int, ch,
1775  int, n)
1776 {
1777 
1778  return hline((chtype)ch, n);
1779 }
1780 
1781 /**
1782  * Method: OrxCurMvhline
1783  *
1784  * Draw a horizontal line.
1785  *
1786  * @param y New Y cursor position
1787  *
1788  * @param x New C cursor position
1789  *
1790  * @param ch Character type (chtype)
1791  *
1792  * @param n Number of characters to draw.
1793  *
1794  * @return Zero.
1795  **/
1796 RexxMethod4(int, // Return type
1797  OrxCurMvhline, // Object_method name
1798  int, y,
1799  int, x,
1800  int, ch,
1801  int, n)
1802 {
1803 
1804  return mvhline(SUBTRACTONE(y), SUBTRACTONE(x), (chtype)ch, n);
1805 }
1806 
1807 /**
1808  * Method: OrxCurIdcok
1809  *
1810  * Use hardware to insert/delete characters.
1811  *
1812  * @param bf Boolean on/off.
1813  *
1814  * @return Zero.
1815  **/
1816 RexxMethod2(int, // Return type
1817  OrxCurIdcok, // Object_method name
1818  logical_t, bf,
1819  CSELF, cself) // Self
1820 {
1821 
1822  idcok((WINDOW *)cself, bf);
1823  return 0;
1824 }
1825 
1826 /**
1827  * Method: OrxCurIdlok
1828  *
1829  * Use hardware to insert/delete lines.
1830  *
1831  * @param bf Boolean on/off.
1832  *
1833  * @return Zero.
1834  **/
1835 RexxMethod2(int, // Return type
1836  OrxCurIdlok, // Object_method name
1837  logical_t, bf,
1838  CSELF, cself) // Self
1839 {
1840 
1841  idlok((WINDOW *)cself, bf);
1842  return 0;
1843 }
1844 
1845 /**
1846  * Method: OrxCurImmedok
1847  *
1848  * Use hardware to provide auto refresh.
1849  *
1850  * @param bf Boolean on/off.
1851  *
1852  * @return Zero.
1853  **/
1854 RexxMethod2(int, // Return type
1855  OrxCurImmedok, // Object_method name
1856  logical_t, bf,
1857  CSELF, cself) // Self
1858 {
1859 
1860  immedok((WINDOW *)cself, bf);
1861  return 0;
1862 }
1863 
1864 /**
1865  * Method: OrxCurInch
1866  *
1867  * Return the attr/char under the cursor.
1868  *
1869  * @return Zero.
1870  **/
1871 RexxMethod1(int, // Return type
1872  OrxCurInch, // Object_method name
1873  CSELF, cself) // Self
1874 {
1875 
1876  return (int)winch((WINDOW *)cself);
1877 }
1878 
1879 /**
1880  * Method: OrxCurMvinch
1881  *
1882  * Return the attr/char under the cursor after moving the
1883  * cursor.
1884  *
1885  * @param y New cursor y position.
1886  *
1887  * @param x New cursor x position.
1888  *
1889  * @return Zero.
1890  **/
1891 RexxMethod3(int, // Return type
1892  OrxCurMvinch, // Object_method name
1893  int, y,
1894  int, x,
1895  CSELF, cself) // Self
1896 {
1897 
1898  if (cself == NULL) {
1899  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1900  context->WholeNumberToObject(1),
1901  context->NewStringFromAsciiz("Window"));
1902  return 0;
1903  }
1904  return (int)mvwinch((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x));
1905 }
1906 
1907 /**
1908  * Method: OrxCurInchstr
1909  *
1910  * Return the attr/char array.
1911  *
1912  * @return Zero.
1913  **/
1915  OrxCurInchstr, // Object_method name
1916  CSELF, cself) // Self
1917 {
1918  chtype *buf;
1919  RexxBufferStringObject rxbuf;
1920 
1921  if (cself == NULL) {
1922  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1923  context->WholeNumberToObject(1),
1924  context->NewStringFromAsciiz("Window"));
1925  return 0;
1926  }
1927  rxbuf = context->NewBufferString(1024 * sizeof(chtype));
1928  buf = (chtype *)context->BufferStringData(rxbuf);
1929  winchnstr((WINDOW *)cself, buf, 1024);
1930  return (RexxObjectPtr)rxbuf;
1931 }
1932 
1933 /**
1934  * Method: OrxCurMvinchstr
1935  *
1936  * Return the attr/char under the cursor after moving the
1937  * cursor.
1938  *
1939  * @param y New cursor y position.
1940  *
1941  * @param x New cursor x position.
1942  *
1943  * @return Zero.
1944  **/
1946  OrxCurMvinchstr, // Object_method name
1947  int, y,
1948  int, x,
1949  CSELF, cself) // Self
1950 {
1951  chtype *buf;
1952  RexxBufferStringObject rxbuf;
1953 
1954  if (cself == NULL) {
1955  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1956  context->WholeNumberToObject(1),
1957  context->NewStringFromAsciiz("Window"));
1958  return 0;
1959  }
1960  rxbuf = context->NewBufferString(1024 * sizeof(chtype));
1961  buf = (chtype *)context->BufferStringData(rxbuf);
1962  mvwinchnstr((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x), buf, 1024);
1963  return (RexxObjectPtr)rxbuf;
1964 }
1965 
1966 /**
1967  * Method: OrxCurInchnstr
1968  *
1969  * Return the attr/char array.
1970  *
1971  * @param n Number of attr/char to return.
1972  *
1973  * @return Zero.
1974  **/
1976  OrxCurInchnstr, // Object_method name
1977  int, n,
1978  CSELF, cself) // Self
1979 {
1980  chtype *buf;
1981  RexxBufferStringObject rxbuf;
1982 
1983  if (cself == NULL) {
1984  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
1985  context->WholeNumberToObject(1),
1986  context->NewStringFromAsciiz("Window"));
1987  return 0;
1988  }
1989  rxbuf = context->NewBufferString(n * sizeof(chtype));
1990  buf = (chtype *)context->BufferStringData(rxbuf);
1991  winchnstr((WINDOW *)cself, buf, n);
1992  return (RexxObjectPtr)rxbuf;
1993 }
1994 
1995 /**
1996  * Method: OrxCurMvinchnstr
1997  *
1998  * Return the attr/char under the cursor after moving the
1999  * cursor.
2000  *
2001  * @param y New cursor y position.
2002  *
2003  * @param x New cursor x position.
2004  *
2005  * @param n Number of attr/char to return.
2006  *
2007  * @return Zero.
2008  **/
2010  OrxCurMvinchnstr, // Object_method name
2011  int, y,
2012  int, x,
2013  int, n,
2014  CSELF, cself) // Self
2015 {
2016  chtype *buf;
2017  RexxBufferStringObject rxbuf;
2018 
2019  if (cself == NULL) {
2020  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2021  context->WholeNumberToObject(1),
2022  context->NewStringFromAsciiz("Window"));
2023  return 0;
2024  }
2025  rxbuf = context->NewBufferString(n * sizeof(chtype));
2026  buf = (chtype *)context->BufferStringData(rxbuf);
2027  mvwinchnstr((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x), buf, n);
2028  return (RexxObjectPtr)rxbuf;
2029 }
2030 
2031 /**
2032  * Method: OrxCurInit_color
2033  *
2034  * Allow the user to redefine colors.
2035  *
2036  * @param c Color number to change.
2037  *
2038  * @param r Red value.
2039  *
2040  * @param g Green value.
2041  *
2042  * @param b Blue value.
2043  *
2044  * @return Zero.
2045  **/
2046 RexxMethod4(int, // Return type
2047  OrxCurInit_color, // Object_method name
2048  int, c,
2049  int, r,
2050  int, g,
2051  int, b)
2052 {
2053 
2054  return init_color((short)c, (short)r, (short)g, (short)b);
2055 }
2056 
2057 /**
2058  * Method: OrxCurInit_pair
2059  *
2060  * Assign foreground an background colors to a color pair.
2061  *
2062  * @param c COLOR_PAIR number to change.
2063  *
2064  * @param f Foreground color.
2065  *
2066  * @param b Background color.
2067  *
2068  * @return Zero.
2069  **/
2070 RexxMethod3(int, // Return type
2071  OrxCurInit_pair, // Object_method name
2072  int, c,
2073  int, f,
2074  int, b)
2075 {
2076 
2077  return init_pair((short)c, (short)f, (short)b);
2078 }
2079 
2080 /**
2081  * Method: OrxCurInsch
2082  *
2083  * Insert attr/char under the cursor.
2084  *
2085  * @param ch chtype to be inserted.
2086  *
2087  * @return Zero.
2088  **/
2089 RexxMethod2(int, // Return type
2090  OrxCurInsch, // Object_method name
2091  CSTRING, ch,
2092  CSELF, cself) // Self
2093 {
2094 
2095  if (cself == NULL) {
2096  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2097  context->WholeNumberToObject(1),
2098  context->NewStringFromAsciiz("Window"));
2099  return 0;
2100  }
2101  return (int)winsch((WINDOW *)cself, (chtype)*ch);
2102 }
2103 
2104 /**
2105  * Method: OrxCurMvinsch
2106  *
2107  * Insert the attr/char under the cursor after moving the
2108  * cursor.
2109  *
2110  * @param y New cursor y position.
2111  *
2112  * @param x New cursor x position.
2113  *
2114  * @param ch chtype to be inserted.
2115  *
2116  * @return Zero.
2117  **/
2118 RexxMethod4(int, // Return type
2119  OrxCurMvinsch, // Object_method name
2120  int, y,
2121  int, x,
2122  CSTRING, ch,
2123  CSELF, cself) // Self
2124 {
2125 
2126  if (cself == NULL) {
2127  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2128  context->WholeNumberToObject(1),
2129  context->NewStringFromAsciiz("Window"));
2130  return 0;
2131  }
2132  return mvwinsch((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x), (chtype)*ch);
2133 }
2134 
2135 /**
2136  * Method: OrxCurInsdelln
2137  *
2138  * Insert/delete lines.
2139  *
2140  * @param n Number of lines to insert/delete.
2141  *
2142  * @return Zero.
2143  **/
2144 RexxMethod2(int, // Return type
2145  OrxCurInsdelln, // Object_method name
2146  int, n,
2147  CSELF, cself) // Self
2148 {
2149 
2150  if (cself == NULL) {
2151  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2152  context->WholeNumberToObject(1),
2153  context->NewStringFromAsciiz("Window"));
2154  return 0;
2155  }
2156  return winsdelln((WINDOW *)cself, SUBTRACTONE(n));
2157 }
2158 
2159 /**
2160  * Method: OrxCurInsertln
2161  *
2162  * Insert one line.
2163  *
2164  * @return Zero.
2165  **/
2166 RexxMethod1(int, // Return type
2167  OrxCurInsertln, // Object_method name
2168  CSELF, cself) // Self
2169 {
2170 
2171  if (cself == NULL) {
2172  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2173  context->WholeNumberToObject(1),
2174  context->NewStringFromAsciiz("Window"));
2175  return 0;
2176  }
2177  return winsertln((WINDOW *)cself);
2178 }
2179 
2180 /**
2181  * Method: OrxCurInsstr
2182  *
2183  * Insert a string.
2184  *
2185  * @param str String to insert.
2186  *
2187  * @return Zero.
2188  **/
2189 RexxMethod2(int, // Return type
2190  OrxCurInsstr, // Object_method name
2191  CSTRING, str,
2192  CSELF, cself) // Self
2193 {
2194 
2195  if (cself == NULL) {
2196  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2197  context->WholeNumberToObject(1),
2198  context->NewStringFromAsciiz("Window"));
2199  return 0;
2200  }
2201  return winsstr((WINDOW *)cself, str);
2202 }
2203 
2204 /**
2205  * Method: OrxCurInsnstr
2206  *
2207  * Insert a string.
2208  *
2209  * @param str String to insert.
2210  *
2211  * @param n Number of characters to insert.
2212  *
2213  * @return Zero.
2214  **/
2215 RexxMethod3(int, // Return type
2216  OrxCurInsnstr, // Object_method name
2217  CSTRING, str,
2218  int, n,
2219  CSELF, cself) // Self
2220 {
2221 
2222  if (cself == NULL) {
2223  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2224  context->WholeNumberToObject(1),
2225  context->NewStringFromAsciiz("Window"));
2226  return 0;
2227  }
2228  return winsnstr((WINDOW *)cself, str, n);
2229 }
2230 
2231 /**
2232  * Method: OrxCurMvinsstr
2233  *
2234  * Insert a string after moving the cursor.
2235  *
2236  * @param y New cursor y position.
2237  *
2238  * @param x New cursor x position.
2239  *
2240  * @param str String to insert.
2241  *
2242  * @return Zero.
2243  **/
2244 RexxMethod4(int, // Return type
2245  OrxCurMvinsstr, // Object_method name
2246  int, y,
2247  int, x,
2248  CSTRING, str,
2249  CSELF, cself) // Self
2250 {
2251 
2252  if (cself == NULL) {
2253  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2254  context->WholeNumberToObject(1),
2255  context->NewStringFromAsciiz("Window"));
2256  return 0;
2257  }
2258  return mvwinsstr((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x), str);
2259 }
2260 
2261 /**
2262  * Method: OrxCurInsnstr
2263  *
2264  * Insert a string.
2265  *
2266  * @param y New cursor y position.
2267  *
2268  * @param x New cursor x position.
2269  *
2270  * @param str String to insert.
2271  *
2272  * @param n Number of characters to insert.
2273  *
2274  * @return Zero.
2275  **/
2276 RexxMethod5(int, // Return type
2277  OrxCurMvinsnstr, // Object_method name
2278  int, y,
2279  int, x,
2280  CSTRING, str,
2281  int, n,
2282  CSELF, cself) // Self
2283 {
2284 
2285  if (cself == NULL) {
2286  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2287  context->WholeNumberToObject(1),
2288  context->NewStringFromAsciiz("Window"));
2289  return 0;
2290  }
2291  return mvwinsnstr((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x), str, n);
2292 }
2293 
2294 /**
2295  * Method: OrxCurInstr
2296  *
2297  * Read a string from the terminal.
2298  *
2299  * @return Zero.
2300  **/
2302  OrxCurInstr, // Object_method name
2303  CSELF, cself) // Self
2304 {
2305  char buf[1024];
2306 
2307  if (cself == NULL) {
2308  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2309  context->WholeNumberToObject(1),
2310  context->NewStringFromAsciiz("Window"));
2311  return 0;
2312  }
2313  winstr((WINDOW *)cself, buf);
2314  return context->NewStringFromAsciiz(buf);
2315 }
2316 
2317 /**
2318  * Method: OrxCurInnstr
2319  *
2320  * Read a string from the terminal.
2321  *
2322  * @param n Number of characters to read.
2323  *
2324  * @return Zero.
2325  **/
2327  OrxCurInnstr, // Object_method name
2328  int, n,
2329  CSELF, cself) // Self
2330 {
2331 
2332  if (cself == NULL) {
2333  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2334  context->WholeNumberToObject(1),
2335  context->NewStringFromAsciiz("Window"));
2336  return 0;
2337  }
2338  char *buf = (char *)malloc(n + 1);
2339  winnstr((WINDOW *)cself, buf, n);
2340  RexxObjectPtr tmp = context->NewStringFromAsciiz(buf);
2341  free(buf);
2342  return tmp;
2343 }
2344 
2345 /**
2346  * Method: OrxCurMvinstr
2347 
2348  * Read a string from the terminal after moving the cursor.
2349  *
2350  * @param y New y position for the cursor.
2351  *
2352  * @param x New x position for the cursor.
2353  *
2354  * @return Zero.
2355  **/
2357  OrxCurMvinstr, // Object_method name
2358  int, y,
2359  int, x,
2360  CSELF, cself) // Self
2361 {
2362  char buf[1024];
2363 
2364  if (cself == NULL) {
2365  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2366  context->WholeNumberToObject(1),
2367  context->NewStringFromAsciiz("Window"));
2368  return 0;
2369  }
2370  mvwinstr((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x), buf);
2371  return context->NewStringFromAsciiz(buf);
2372 }
2373 
2374 /**
2375  * Method: OrxCurMvinnstr
2376  *
2377  * Read a string from the terminal after moving the cursor.
2378  *
2379  * @param y New y position for the cursor.
2380  *
2381  * @param x New x position for the cursor.
2382  *
2383  * @param n Number of characters to read.
2384  *
2385  * @return Zero.
2386  **/
2388  OrxCurMvinnstr, // Object_method name
2389  int, y,
2390  int, x,
2391  int, n,
2392  CSELF, cself) // Self
2393 {
2394 
2395  if (cself == NULL) {
2396  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2397  context->WholeNumberToObject(1),
2398  context->NewStringFromAsciiz("Window"));
2399  return 0;
2400  }
2401  char *buf = (char *)malloc(n + 1);
2402  mvwinnstr((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x), buf, n);
2403  RexxObjectPtr tmp = context->NewStringFromAsciiz(buf);
2404  free(buf);
2405  return tmp;
2406 }
2407 
2408 /**
2409  * Method: OrxCurIntrflush
2410  *
2411  * Turn on/off input queue flushing when a interrupt key is
2412  * typed at the keyboard.
2413  *
2414  * @param bf Boolean
2415  *
2416  * @return Zero.
2417  **/
2418 RexxMethod2(int, // Return type
2419  OrxCurIntrflush, // Object_method name
2420  logical_t, bf,
2421  CSELF, cself) // Self
2422 {
2423 
2424  if (cself == NULL) {
2425  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2426  context->WholeNumberToObject(1),
2427  context->NewStringFromAsciiz("Window"));
2428  return 0;
2429  }
2430  return intrflush((WINDOW *)cself, bf);
2431 }
2432 
2433 /**
2434  * Method: OrxCurIsbitset
2435  *
2436  * Return true if a bit is set.
2437  *
2438  * @param field Field value to test.
2439  *
2440  * @param bit The bit to test.
2441  *
2442  * @return Zero.
2443  **/
2444 RexxMethod2(logical_t, // Return type
2445  OrxCurIsbitset, // Object_method name
2446  int, field,
2447  int, bit)
2448 {
2449 
2450  return (field & bit);
2451 }
2452 
2453 /**
2454  * Method: OrxCurIsendwin
2455  *
2456  * Return true if endwin() has been called.
2457  *
2458  * @return Zero.
2459  **/
2460 RexxMethod0(logical_t, // Return type
2461  OrxCurIsendwin) // Object_method name
2462 {
2463 
2464  return isendwin();
2465 }
2466 
2467 /**
2468  * Method: OrxCurIs_linetouched
2469  *
2470  * Determine if a line has been changed since the last refresh.
2471  *
2472  * @param n Line number.
2473  *
2474  * @return Zero.
2475  **/
2476 RexxMethod2(logical_t, // Return type
2477  OrxCurIs_linetouched, // Object_method name
2478  int, n,
2479  CSELF, cself) // Self
2480 {
2481 
2482  if (cself == NULL) {
2483  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2484  context->WholeNumberToObject(1),
2485  context->NewStringFromAsciiz("Window"));
2486  return 0;
2487  }
2488  return is_linetouched((WINDOW *)cself, SUBTRACTONE(n));
2489 }
2490 
2491 /**
2492  * Method: OrxCurIs_wintouched
2493  *
2494  * Determine if a window has been changed since the last
2495  * refresh.
2496  *
2497  * @return Zero.
2498  **/
2499 RexxMethod1(logical_t, // Return type
2500  OrxCurIs_wintouched, // Object_method name
2501  CSELF, cself) // Self
2502 {
2503 
2504  if (cself == NULL) {
2505  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2506  context->WholeNumberToObject(1),
2507  context->NewStringFromAsciiz("Window"));
2508  return 0;
2509  }
2510  return is_wintouched((WINDOW *)cself);
2511 }
2512 
2513 /**
2514  * Method: OrxCurKeyname
2515  *
2516  * Return a string representing the specified input key.
2517  *
2518  * @param k Key value (decimal number).
2519  *
2520  * @return Zero.
2521  **/
2523  OrxCurKeyname, // Object_method name
2524  int, k)
2525 {
2526 
2527  return (RexxObjectPtr)context->NewStringFromAsciiz(keyname(k));
2528 }
2529 
2530 /**
2531  * Method: OrxCurKeypad
2532  *
2533  * Turn on/off reading keypad (function, etc) keys.
2534  *
2535  * @param bf Boolean.
2536  *
2537  * @return Zero.
2538  **/
2539 RexxMethod2(int, // Return type
2540  OrxCurKeypad, // Object_method name
2541  logical_t, bf,
2542  CSELF, cself) // Self
2543 {
2544 
2545  if (cself == NULL) {
2546  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2547  context->WholeNumberToObject(1),
2548  context->NewStringFromAsciiz("Window"));
2549  return 0;
2550  }
2551  return keypad((WINDOW *)cself, bf);
2552 }
2553 
2554 /**
2555  * Method: OrxCurKillchar
2556  *
2557  * Return the kill terminal's kill character.
2558  *
2559  * @return Zero.
2560  **/
2562  OrxCurKillchar) // Object_method name
2563 {
2564  char buf[2] = {'\0', '\0'};
2565 
2566  buf[0] = killchar();
2567  return (RexxObjectPtr)context->NewStringFromAsciiz(buf);
2568 }
2569 
2570 /**
2571  * Method: OrxCurLeaveok
2572  *
2573  * Turn on/off synchrnizing the logical and the hardware cursor
2574  * location after a refresh.
2575  *
2576  * @param bf Boolean.
2577  *
2578  * @return Zero.
2579  **/
2580 RexxMethod2(int, // Return type
2581  OrxCurLeaveok, // Object_method name
2582  logical_t, bf,
2583  CSELF, cself) // Self
2584 {
2585 
2586  if (cself == NULL) {
2587  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2588  context->WholeNumberToObject(1),
2589  context->NewStringFromAsciiz("Window"));
2590  return 0;
2591  }
2592  return leaveok((WINDOW *)cself, bf);
2593 }
2594 
2595 /**
2596  * Method: OrxCurLines
2597  *
2598  * Return the number of lines on the stdscr.
2599  *
2600  * @return Zero.
2601  **/
2602 RexxMethod0(int, // Return type
2603  OrxCurLines) // Object_method name
2604 {
2605 
2606  return LINES;
2607 }
2608 
2609 /**
2610  * Method: OrxCurLongname
2611  *
2612  * Return the terminal string description.
2613  *
2614  * @return Zero.
2615  **/
2617  OrxCurLongname) // Object_method name
2618 {
2619 
2620  return (RexxObjectPtr)context->NewStringFromAsciiz(longname());
2621 }
2622 
2623 /**
2624  * Method: OrxCurMeta
2625  *
2626  * Turn on/off reading the Alt key info in the 8th bit.
2627  *
2628  * @param bf Boolean.
2629  *
2630  * @return Zero.
2631  **/
2632 RexxMethod2(int, // Return type
2633  OrxCurMeta, // Object_method name
2634  logical_t, bf,
2635  CSELF, cself) // Self
2636 {
2637 
2638  if (cself == NULL) {
2639  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2640  context->WholeNumberToObject(1),
2641  context->NewStringFromAsciiz("Window"));
2642  return 0;
2643  }
2644  return meta((WINDOW *)cself, bf);
2645 }
2646 
2647 /**
2648  * Method: OrxCurMouse_trafo
2649  *
2650  * Translate mouse y and x coordinates.
2651  *
2652  * @param y Y mouse coordinate.
2653  *
2654  * @param x X mouse coordinate.
2655  *
2656  * @param bf Boolean.
2657  *
2658  * @return Zero.
2659  **/
2661  OrxCurMouse_trafo, // Object_method name
2662  int, y,
2663  int, x,
2664  logical_t, bf,
2665  CSELF, cself) // Self
2666 {
2667  char buf[32];
2668 
2669  if (cself == NULL) {
2670  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2671  context->WholeNumberToObject(1),
2672  context->NewStringFromAsciiz("Window"));
2673  return 0;
2674  }
2675  wmouse_trafo((WINDOW *)cself, &y, &x, bf);
2676  snprintf(buf, sizeof buf, "%d %d", ADDONE(y), ADDONE(x));
2677  return (RexxObjectPtr)context->NewStringFromAsciiz(buf);
2678 }
2679 
2680 /**
2681  * Method: OrxCurMousemask
2682  *
2683  * Set/return the mouse event mask.
2684  *
2685  * @param old Old mouse mask ou 0.
2686  *
2687  * @return Zero.
2688  **/
2689 RexxMethod1(int, // Return type
2690  OrxCurMousemask, // Object_method name
2691  int, newmask)
2692 {
2693 
2694  return mousemask(newmask, NULL);
2695 }
2696 
2697 /**
2698  * Method: OrxCurMove
2699  *
2700  * Move the cursor.
2701  *
2702  * @param y New Y cursor position.
2703  *
2704  * @param x New X cursor position.
2705  *
2706  * @return Zero.
2707  **/
2708 RexxMethod3(int, // Return type
2709  OrxCurMove, // Object_method name
2710  int, y,
2711  int, x,
2712  CSELF, cself) // Self
2713 {
2714 
2715  if (cself == NULL) {
2716  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2717  context->WholeNumberToObject(1),
2718  context->NewStringFromAsciiz("Window"));
2719  return 0;
2720  }
2721  return wmove((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x));
2722 }
2723 
2724 /**
2725  * Method: OrxCurMvderwin
2726  *
2727  * Display a different portion of the parent window.
2728  *
2729  * @param y Parent Y position.
2730  *
2731  * @param x Parent X position.
2732  *
2733  * @return Zero.
2734  **/
2735 RexxMethod3(int, // Return type
2736  OrxCurMvderwin, // Object_method name
2737  int, y,
2738  int, x,
2739  CSELF, cself) // Self
2740 {
2741 
2742  if (cself == NULL) {
2743  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2744  context->WholeNumberToObject(1),
2745  context->NewStringFromAsciiz("Window"));
2746  return 0;
2747  }
2748  return mvderwin((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x));
2749 }
2750 
2751 /**
2752  * Method: OrxCurMvwin
2753  *
2754  * Move a window.
2755  *
2756  * @param y Parent Y position.
2757  *
2758  * @param x Parent X position.
2759  *
2760  * @return Zero.
2761  **/
2762 RexxMethod3(int, // Return type
2763  OrxCurMvwin, // Object_method name
2764  int, y,
2765  int, x,
2766  CSELF, cself) // Self
2767 {
2768 
2769  if (cself == NULL) {
2770  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2771  context->WholeNumberToObject(1),
2772  context->NewStringFromAsciiz("Window"));
2773  return 0;
2774  }
2775  return mvwin((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x));
2776 }
2777 
2778 /**
2779  * Method: OrxCurNapms
2780  *
2781  * Pause the program for number of microseconds.
2782  *
2783  * @param n Number of microseconds
2784  *
2785  * @return Zero.
2786  **/
2787 RexxMethod1(int, // Return type
2788  OrxCurNapms, // Object_method name
2789  int, n)
2790 {
2791 
2792  return napms(n);
2793 }
2794 
2795 /**
2796  * Method: OrxCurNcurses_mouse_version
2797  *
2798  * Return the Ncurses mouse version string.
2799  *
2800  * @return Zero.
2801  **/
2803  OrxCurNcurses_mouse_version) // Object_method name
2804 {
2805  char buf[64];
2806 
2807  snprintf(buf, sizeof buf, "%d", NCURSES_MOUSE_VERSION);
2808  return (RexxObjectPtr)context->NewStringFromAsciiz(buf);
2809 }
2810 
2811 /**
2812  * Method: OrxCurNcurses_version
2813  *
2814  * Return the Ncurses version string.
2815  *
2816  * @return Zero.
2817  **/
2819  OrxCurNcurses_version) // Object_method name
2820 {
2821 
2822  return (RexxObjectPtr)context->NewStringFromAsciiz(NCURSES_VERSION);
2823 }
2824 
2825 /**
2826  * Method: OrxCurNewpad
2827  *
2828  * Create a new pad.
2829  *
2830  * @param nlines Number of lines.
2831  *
2832  * @param ncols Number of columns.
2833  *
2834  * @return Zero.
2835  **/
2836 RexxMethod2(int, // Return type
2837  OrxCurNewpad, // Object_method name
2838  int, nlines,
2839  int, ncols)
2840 {
2841 
2842  context->SetObjectVariable("CSELF", context->NewPointer(newpad(nlines, ncols)));
2843  return 0;
2844 }
2845 
2846 /**
2847  * Method: OrxCurNl
2848  *
2849  * Distinguish between cr and lf.
2850  *
2851  * @return Zero.
2852  **/
2853 RexxMethod0(int, // Return type
2854  OrxCurNl) // Object_method name
2855 {
2856 
2857  return nl();
2858 }
2859 
2860 /**
2861  * Method: OrxCurNonl
2862  *
2863  * Do not distinguish between cr and lf.
2864  *
2865  * @return Zero.
2866  **/
2867 RexxMethod0(int, // Return type
2868  OrxCurNonl) // Object_method name
2869 {
2870 
2871  return nonl();
2872 }
2873 
2874 /**
2875  * Method: OrxCurNodelay
2876  *
2877  * Transforms getch() function to nonblocking.
2878  *
2879  * @param bf On/off boolean.
2880  *
2881  * @return Zero.
2882  **/
2883 RexxMethod2(int, // Return type
2884  OrxCurNodelay, // Object_method name
2885  logical_t, bf,
2886  CSELF, cself) // Self
2887 {
2888 
2889  if (cself == NULL) {
2890  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2891  context->WholeNumberToObject(1),
2892  context->NewStringFromAsciiz("Window"));
2893  return 0;
2894  }
2895  return nodelay((WINDOW *)cself, bf);
2896 }
2897 
2898 /**
2899  * Method: OrxCurNotimeout
2900  *
2901  * Pause input function after user presses ESC key.
2902  *
2903  * @param bf On/off boolean.
2904  *
2905  * @return Zero.
2906  **/
2907 RexxMethod2(int, // Return type
2908  OrxCurNotimeout, // Object_method name
2909  logical_t, bf,
2910  CSELF, cself) // Self
2911 {
2912 
2913  if (cself == NULL) {
2914  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2915  context->WholeNumberToObject(1),
2916  context->NewStringFromAsciiz("Window"));
2917  return 0;
2918  }
2919  return notimeout((WINDOW *)cself, bf);
2920 }
2921 
2922 /**
2923  * Method: OrxCurOverlay
2924  *
2925  * Overlay the destination window.
2926  *
2927  * @param dwin Destination window.
2928  *
2929  * @return Zero.
2930  **/
2931 RexxMethod2(int, // Return type
2932  OrxCurOverlay, // Object_method name
2933  RexxObjectPtr, rxdwin,
2934  CSELF, cself) // Self
2935 {
2936 
2937  if (cself == NULL) {
2938  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2939  context->WholeNumberToObject(1),
2940  context->NewStringFromAsciiz("Window"));
2941  return 0;
2942  }
2943  WINDOW *dwin = (WINDOW *)context->ObjectToCSelf(rxdwin);
2944  return overlay((WINDOW *)cself, dwin);
2945 }
2946 
2947 /**
2948  * Method: OrxCurOverwrite
2949  *
2950  * Overlay the destination window.
2951  *
2952  * @param dwin Destination window.
2953  *
2954  * @return Zero.
2955  **/
2956 RexxMethod2(int, // Return type
2957  OrxCurOverwrite, // Object_method name
2958  RexxObjectPtr, rxdwin,
2959  CSELF, cself) // Self
2960 {
2961 
2962  if (cself == NULL) {
2963  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
2964  context->WholeNumberToObject(1),
2965  context->NewStringFromAsciiz("Window"));
2966  return 0;
2967  }
2968  WINDOW *dwin = (WINDOW *)context->ObjectToCSelf(rxdwin);
2969  return overwrite((WINDOW *)cself, dwin);
2970 }
2971 
2972 /**
2973  * Method: OrxCurPair_content
2974  *
2975  * Return the pair of colors in a color pair.
2976  *
2977  * @param num Color pair number.
2978  *
2979  * @return Zero.
2980  **/
2982  OrxCurPair_content, // Object_method name
2983  int, num)
2984 {
2985  char buf[64];
2986  short f, b;
2987 
2988  int retc = pair_content((short)num, &f, &b);
2989  snprintf(buf, sizeof buf, "%d %d", f, b);
2990  return (RexxObjectPtr)context->NewStringFromAsciiz(buf);
2991 }
2992 
2993 /**
2994  * Method: OrxCurPair_number
2995  *
2996  * Return the default pair attr.
2997  *
2998  * @param attr Color pair attribute.
2999  *
3000  * @return Zero.
3001  **/
3002 RexxMethod1(int, // Return type
3003  OrxCurPair_number, // Object_method name
3004  int, num)
3005 {
3006 
3007  return PAIR_NUMBER(num);
3008 }
3009 
3010 /**
3011  * Method: OrxCurPechochar
3012  *
3013  * Echo one character to a pad and the stdscr..
3014  *
3015  * @param ch Character to echo.
3016  *
3017  * @return Zero.
3018  **/
3019 RexxMethod2(int, // Return type
3020  OrxCurPechochar, // Object_method name
3021  CSTRING, ch,
3022  CSELF, cself) // Self
3023 {
3024 
3025  if (cself == NULL) {
3026  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
3027  context->WholeNumberToObject(1),
3028  context->NewStringFromAsciiz("Pad"));
3029  return 0;
3030  }
3031  return pechochar((WINDOW *)cself, (chtype)*ch);
3032 }
3033 
3034 /**
3035  * Method: OrxCurPnoutrefresh
3036  *
3037  * Refresh a pad.
3038  *
3039  * @param minrow Minimum row number.
3040  *
3041  * @param mincol Minimum col number.
3042  *
3043  * @param sminrow Minimum row number.
3044  *
3045  * @param smincol Minimum col number.
3046  *
3047  * @param smaxrow Maximum row number.
3048  *
3049  * @param smaxcol Maximum col number.
3050  *
3051  * @return Zero.
3052  **/
3053 RexxMethod7(int, // Return type
3054  OrxCurPnoutrefresh, // Object_method name
3055  int, minrow,
3056  int, mincol,
3057  int, sminrow,
3058  int, smincol,
3059  int, smaxrow,
3060  int, smaxcol,
3061  CSELF, cself) // Self
3062 {
3063 
3064  if (cself == NULL) {
3065  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
3066  context->WholeNumberToObject(1),
3067  context->NewStringFromAsciiz("Pad"));
3068  return 0;
3069  }
3070  return pnoutrefresh((WINDOW *)cself, SUBTRACTONE(minrow), SUBTRACTONE(mincol),
3071  SUBTRACTONE(sminrow), SUBTRACTONE(smincol),
3072  SUBTRACTONE(smaxrow), SUBTRACTONE(smaxcol));
3073 }
3074 
3075 /**
3076  * Method: OrxCurPrefresh
3077  *
3078  * Refresh the pad to the stdscr.
3079  *
3080  * @param minrow Minimum row number.
3081  *
3082  * @param mincol Minimum col number.
3083  *
3084  * @param sminrow Minimum row number.
3085  *
3086  * @param smincol Minimum col number.
3087  *
3088  * @param smaxrow Maximum row number.
3089  *
3090  * @param smaxcol Maximum col number.
3091  *
3092  * @return Zero.
3093  **/
3094 RexxMethod7(int, // Return type
3095  OrxCurPrefresh, // Object_method name
3096  int, minrow,
3097  int, mincol,
3098  int, sminrow,
3099  int, smincol,
3100  int, smaxrow,
3101  int, smaxcol,
3102  CSELF, cself) // Pad
3103 {
3104 
3105  if (cself == NULL) {
3106  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
3107  context->WholeNumberToObject(1),
3108  context->NewStringFromAsciiz("Pad"));
3109  return 0;
3110  }
3111  return prefresh((WINDOW *)cself, SUBTRACTONE(minrow), SUBTRACTONE(mincol),
3112  SUBTRACTONE(sminrow), SUBTRACTONE(smincol),
3113  SUBTRACTONE(smaxrow), SUBTRACTONE(smaxcol));
3114 }
3115 
3116 /**
3117  * Method: OrxCurPutwin
3118  *
3119  * Save a new window to a file.
3120  *
3121  * @param fname File name.
3122  *
3123  * @return Zero.
3124  **/
3125 RexxMethod2(int, // Return type
3126  OrxCurPutwin, // Object_method name
3127  CSTRING, filename,
3128  CSELF, cself) // Self
3129 {
3130  FILE *wfile;
3131 
3132  if (cself == NULL) {
3133  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
3134  context->WholeNumberToObject(1),
3135  context->NewStringFromAsciiz("Window"));
3136  return 0;
3137  }
3138  wfile = fopen(filename, "w");
3139  int retc = putwin((WINDOW *)cself, wfile);
3140  fclose(wfile);
3141  return retc;
3142 }
3143 
3144 /**
3145  * Method: OrxCurQiflush
3146  *
3147  * Flush the input queue on interrupt.
3148  *
3149  * @return Zero.
3150  **/
3151 RexxMethod0(int, // Return type
3152  OrxCurQiflush) // Object_method name
3153 {
3154 
3155  qiflush();
3156  return 0;
3157 }
3158 
3159 /**
3160  * Method: OrxCurNoqiflush
3161  *
3162  * Do no flush the input queue on interrupt.
3163  *
3164  * @return Zero.
3165  **/
3166 RexxMethod0(int, // Return type
3167  OrxCurNoqiflush) // Object_method name
3168 {
3169 
3170  noqiflush();
3171  return 0;
3172 }
3173 
3174 /**
3175  * Method: OrxCurRaw
3176  *
3177  * Remove modification done by the terminal to input.
3178  *
3179  * @return Zero.
3180  **/
3181 RexxMethod0(int, // Return type
3182  OrxCurRaw) // Object_method name
3183 {
3184 
3185  return raw();
3186 }
3187 
3188 /**
3189  * Method: OrxCurNoraw
3190  *
3191  * Do not remove modification done by the terminal to input.
3192  *
3193  * @return Zero.
3194  **/
3195 RexxMethod0(int, // Return type
3196  OrxCurNoraw) // Object_method name
3197 {
3198 
3199  return noraw();
3200 }
3201 
3202 /**
3203  * Method: OrxCurRedrawwin
3204  *
3205  * Redraw an entire window.
3206  *
3207  * @return Zero.
3208  **/
3209 RexxMethod1(int, // Return type
3210  OrxCurRedrawwin, // Object_method name
3211  CSELF, cself) // Self
3212 {
3213 
3214  if (cself == NULL) {
3215  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
3216  context->WholeNumberToObject(1),
3217  context->NewStringFromAsciiz("Window"));
3218  return 0;
3219  }
3220  return redrawwin((WINDOW *)cself);
3221 }
3222 
3223 /**
3224  * Method: OrxCurScr_dump
3225  *
3226  * Dump the terminal screen to a file.
3227  *
3228  * @param fname Output file name.
3229  *
3230  * @return Zero.
3231  **/
3232 RexxMethod1(int, // Return type
3233  OrxCurScr_dump, // Object_method name
3234  CSTRING, fname)
3235 {
3236 
3237  return scr_dump(fname);
3238 }
3239 
3240 /**
3241  * Method: OrxCurScr_restore
3242  *
3243  * Restore the terminal screen drom a file.
3244  *
3245  * @param fname Input file name.
3246  *
3247  * @return Zero.
3248  **/
3249 RexxMethod1(int, // Return type
3250  OrxCurScr_restore, // Object_method name
3251  CSTRING, fname)
3252 {
3253 
3254  return scr_restore(fname);
3255 }
3256 
3257 /**
3258  * Method: OrxCurScrl
3259  *
3260  * Scroll a window.
3261  *
3262  * @param num Number of lines to scroll.
3263  *
3264  * @return Zero.
3265  **/
3266 RexxMethod2(int, // Return type
3267  OrxCurScrl, // Object_method name
3268  int, n,
3269  CSELF, cself) // Self
3270 {
3271 
3272  if (cself == NULL) {
3273  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
3274  context->WholeNumberToObject(1),
3275  context->NewStringFromAsciiz("Window"));
3276  return 0;
3277  }
3278  return wscrl((WINDOW *)cself, n);
3279 }
3280 
3281 /**
3282  * Method: OrxCurScroll
3283  *
3284  * Scroll a window.
3285  *
3286  * @return Zero.
3287  **/
3288 RexxMethod1(int, // Return type
3289  OrxCurScroll, // Object_method name
3290  CSELF, cself) // Self
3291 {
3292 
3293  if (cself == NULL) {
3294  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
3295  context->WholeNumberToObject(1),
3296  context->NewStringFromAsciiz("Window"));
3297  return 0;
3298  }
3299  return scroll((WINDOW *)cself);
3300 }
3301 
3302 /**
3303  * Method: OrxCurScrollok
3304  *
3305  * Allaow a wildow to scroll.
3306  *
3307  * @param bf Boolean indicator.
3308  *
3309  * @return Zero.
3310  **/
3311 RexxMethod2(int, // Return type
3312  OrxCurScrollok, // Object_method name
3313  logical_t, bf,
3314  CSELF, cself) // Self
3315 {
3316 
3317  if (cself == NULL) {
3318  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
3319  context->WholeNumberToObject(1),
3320  context->NewStringFromAsciiz("Window"));
3321  return 0;
3322  }
3323  return scrollok((WINDOW *)cself, bf);
3324 }
3325 
3326 /**
3327  * Method: OrxCurSetscrreg
3328  *
3329  * Set a window reagion scrollable.
3330  *
3331  * @param top Top row.
3332  *
3333  * @param bot Bottom row.
3334  *
3335  * @return Zero.
3336  **/
3337 RexxMethod3(int, // Return type
3338  OrxCurSetscrreg, // Object_method name
3339  int, top,
3340  int, bot,
3341  CSELF, cself) // Self
3342 {
3343 
3344  if (cself == NULL) {
3345  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
3346  context->WholeNumberToObject(1),
3347  context->NewStringFromAsciiz("Window"));
3348  return 0;
3349  }
3350  return wsetscrreg((WINDOW *)cself, SUBTRACTONE(top), SUBTRACTONE(bot));
3351 }
3352 
3353 /**
3354  * Method: OrxCurSlk_attr
3355  *
3356  * Return soft label attr_t.
3357  *
3358  * @return Zero.
3359  **/
3360 RexxMethod0(int, // Return type
3361  OrxCurSlk_attr) // Object_method name
3362 {
3363 
3364  return slk_attr();
3365 }
3366 
3367 /**
3368  * Method: OrxCurSlk_attroff
3369  *
3370  * Turn off one or more soft label attributes.
3371  *
3372  * @param attr Attribute(s).
3373  *
3374  * @return Zero.
3375  **/
3376 RexxMethod1(int, // Return type
3377  OrxCurSlk_attroff, // Object_method name
3378  int, attr)
3379 {
3380 
3381  return slk_attroff(attr);
3382 }
3383 
3384 /**
3385  * Method: OrxCurSlk_attron
3386  *
3387  * Turn on one or more soft label attributes.
3388  *
3389  * @param attr Attribute(s).
3390  *
3391  * @return Zero.
3392  **/
3393 RexxMethod1(int, // Return type
3394  OrxCurSlk_attron, // Object_method name
3395  int, attr)
3396 {
3397 
3398  return slk_attron(attr);
3399 }
3400 
3401 /**
3402  * Method: OrxCurSlk_attrset
3403  *
3404  * Set soft label attributes.
3405  *
3406  * @param attr Attribute(s).
3407  *
3408  * @return Zero.
3409  **/
3410 RexxMethod1(int, // Return type
3411  OrxCurSlk_attrset, // Object_method name
3412  int, attr)
3413 {
3414 
3415  return slk_attrset(attr);
3416 }
3417 
3418 /**
3419  * Method: OrxCurSlk_clear
3420  *
3421  * Hide the soft labels.
3422  *
3423  * @return Zero.
3424  **/
3425 RexxMethod0(int, // Return type
3426  OrxCurSlk_clear) // Object_method name
3427 {
3428 
3429  return slk_clear();
3430 }
3431 
3432 /**
3433  * Method: OrxCurSlk_color
3434  *
3435  * Set soft label colors.
3436  *
3437  * @param color Color pair number.
3438  *
3439  * @return Zero.
3440  **/
3441 RexxMethod1(int, // Return type
3442  OrxCurSlk_color, // Object_method name
3443  int, color)
3444 {
3445 
3446  return slk_color((short)color);
3447 }
3448 
3449 /**
3450  * Method: OrxCurSlk_init
3451  *
3452  * Initialize for soft label.
3453  *
3454  * @param fmt Line format.
3455  *
3456  * @return Zero.
3457  **/
3458 RexxMethod1(int, // Return type
3459  OrxCurSlk_init, // Object_method name
3460  int, fmt)
3461 {
3462 
3463  return slk_init(fmt);
3464 }
3465 
3466 /**
3467  * Method: OrxCurSlk_label
3468  *
3469  * Return the soft label text.
3470  *
3471  * @param num Number of the soft label.
3472  *
3473  * @return Zero.
3474  **/
3476  OrxCurSlk_label, // Object_method name
3477  int, num)
3478 {
3479 
3480  return (RexxObjectPtr)context->NewStringFromAsciiz(slk_label(num));
3481 }
3482 
3483 /**
3484  * Method: OrxCurSlk_noutrefresh
3485  *
3486  * Prepares soft labels for a refresh.
3487  *
3488  * @return Zero.
3489  **/
3490 RexxMethod0(int, // Return type
3491  OrxCurSlk_noutrefresh) // Object_method name
3492 {
3493 
3494  return slk_noutrefresh();
3495 }
3496 
3497 /**
3498  * Method: OrxCurSlk_refresh
3499  *
3500  * Refresh soft labels.
3501  *
3502  * @return Zero.
3503  **/
3504 RexxMethod0(int, // Return type
3505  OrxCurSlk_refresh) // Object_method name
3506 {
3507 
3508  return slk_refresh();
3509 }
3510 
3511 /**
3512  * Method: OrxCurSlk_restore
3513  *
3514  * Restore soft labels.
3515  *
3516  * @return Zero.
3517  **/
3518 RexxMethod0(int, // Return type
3519  OrxCurSlk_restore) // Object_method name
3520 {
3521 
3522  return slk_restore();
3523 }
3524 
3525 /**
3526  * Method: OrxCurSlk_set
3527  *
3528  * Set soft label text.
3529  *
3530  * @param text Soft label text.
3531  *
3532  * @param num Soft label number.
3533  *
3534  * @return Zero.
3535  **/
3536 RexxMethod3(int, // Return type
3537  OrxCurSlk_set, // Object_method name
3538  int, num,
3539  CSTRING, text,
3540  int, fmt)
3541 {
3542 
3543  return slk_set(num, text, fmt);
3544 }
3545 
3546 /**
3547  * Method: OrxCurSlk_touch
3548  *
3549  * Touch soft labels.
3550  *
3551  * @return Zero.
3552  **/
3553 RexxMethod0(int, // Return type
3554  OrxCurSlk_touch) // Object_method name
3555 {
3556 
3557  return slk_touch();
3558 }
3559 
3560 /**
3561  * Method: OrxCurStandend
3562  *
3563  * Turn off text attributes.
3564  *
3565  * @return Zero.
3566  **/
3567 RexxMethod1(int, // Return type
3568  OrxCurStandend, // Object_method name
3569  CSELF, cself) // Self
3570 {
3571 
3572  if (cself == NULL) {
3573  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
3574  context->WholeNumberToObject(1),
3575  context->NewStringFromAsciiz("Window"));
3576  return 0;
3577  }
3578  return wstandend((WINDOW *)cself);
3579 }
3580 
3581 /**
3582  * Method: OrxCurStandout
3583  *
3584  * Turn on text attributes.
3585  *
3586  * @return Zero.
3587  **/
3588 RexxMethod1(int, // Return type
3589  OrxCurStandout, // Object_method name
3590  CSELF, cself) // Self
3591 {
3592 
3593  if (cself == NULL) {
3594  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
3595  context->WholeNumberToObject(1),
3596  context->NewStringFromAsciiz("Window"));
3597  return 0;
3598  }
3599  return wstandout((WINDOW *)cself);
3600 }
3601 
3602 /**
3603  * Method: OrxCurStart_color
3604  *
3605  * Turn on using color attributes.
3606  *
3607  * @return Zero.
3608  **/
3609 RexxMethod0(int, // Return type
3610  OrxCurStart_color) // Object_method name
3611 {
3612 
3613  return start_color();
3614 }
3615 
3616 /**
3617  * Method: OrxCurSubpadprivate
3618  *
3619  * Create a subpad.
3620  *
3621  * @param nlines Number of lines.
3622  *
3623  * @param ncols Number of cols.
3624  *
3625  * @param begy Beginning Y line.
3626  *
3627  * @param begx Beginning X column.
3628  *
3629  * @return Zero.
3630  **/
3631 RexxMethod6(int, // Return type
3632  OrxCurSubpadprivate, // Object_method name
3633  RexxObjectPtr, pad,
3634  int, nlines,
3635  int, ncols,
3636  int, begy,
3637  int, begx,
3638  CSELF, cself) // Self
3639 {
3640 
3641  WINDOW *padptr = (WINDOW *) context->ObjectToCSelf(pad);
3642  WINDOW *ptr = subpad((WINDOW *)padptr, nlines, ncols, SUBTRACTONE(begy), SUBTRACTONE(begx));
3643  context->SetObjectVariable("CSELF", context->NewPointer(ptr));
3644  return 0;
3645 }
3646 
3647 /**
3648  * Method: OrxCurSubwinprivate
3649  *
3650  * Create a subwindow.
3651  *
3652  * @param nlines Number of lines.
3653  *
3654  * @param ncols Number of cols.
3655  *
3656  * @param begy Beginning Y line.
3657  *
3658  * @param begx Beginning X column.
3659  *
3660  * @return Zero.
3661  **/
3663  OrxCurSubwinprivate, // Object_method name
3664  int, nlines,
3665  int, ncols,
3666  int, begy,
3667  int, begx,
3668  CSELF, cself) // Self
3669 {
3670 
3671  WINDOW *ptr = subwin((WINDOW *)cself, nlines, ncols, SUBTRACTONE(begy), SUBTRACTONE(begx));
3672  return (RexxObjectPtr)context->NewPointer(ptr);
3673 }
3674 
3675 /**
3676  * Method: OrxCurSyncok
3677  *
3678  * Turn on/off aut touch for a window.
3679  *
3680  * @param bf On/off boolean.
3681  *
3682  * @return Zero.
3683  **/
3684 RexxMethod2(int, // Return type
3685  OrxCurSyncok, // Object_method name
3686  logical_t, bf,
3687  CSELF, cself) // Self
3688 {
3689 
3690  if (cself == NULL) {
3691  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
3692  context->WholeNumberToObject(1),
3693  context->NewStringFromAsciiz("Window"));
3694  return 0;
3695  }
3696  return syncok((WINDOW *)cself, bf);
3697 }
3698 
3699 /**
3700  * Method: OrxCurTabsize
3701  *
3702  * Return/set the tab size.
3703  *
3704  * @param sz New tab size.
3705  *
3706  * @return Zero.
3707  **/
3708 RexxMethod1(int, // Return type
3709  OrxCurTabsize, // Object_method name
3710  OPTIONAL_int, sz)
3711 {
3712  if (argumentExists(1)) {
3713  set_tabsize(sz);
3714  }
3715  return TABSIZE;
3716 }
3717 
3718 /**
3719  * Method: OrxCurTermattrs
3720  *
3721  * Return the which attributes the terminal is capable of
3722  * producing.
3723  *
3724  * @return Zero.
3725  **/
3726 RexxMethod0(int, // Return type
3727  OrxCurTermattrs) // Object_method name
3728 {
3729 
3730  return (int) termattrs();
3731 }
3732 
3733 /**
3734  * Method: OrxCurtermname
3735  *
3736  * Return the terminal name.
3737  *
3738  * @return Zero.
3739  **/
3741  OrxCurTermname) // Object_method name
3742 {
3743 
3744  return (RexxObjectPtr)context->NewStringFromAsciiz(termname());
3745 }
3746 
3747 /**
3748  * Method: OrxCurTimeout
3749  *
3750  * Set the timeout for text input.
3751  *
3752  * @param tmout Timeout value.
3753  *
3754  * @return Zero.
3755  **/
3756 RexxMethod1(int, // Return type
3757  OrxCurTimeout, // Object_method name
3758  int, tmout)
3759 {
3760 
3761  timeout(tmout);
3762  return 0;
3763 }
3764 
3765 /**
3766  * Method: OrxCurTouchline
3767  *
3768  * Mark one or more lines as changed.
3769  *
3770  * @param bf On/off boolean.
3771  *
3772  * @return Zero.
3773  **/
3774 RexxMethod3(int, // Return type
3775  OrxCurTouchline, // Object_method name
3776  int, start,
3777  int, cnt,
3778  CSELF, cself) // Self
3779 {
3780 
3781  if (cself == NULL) {
3782  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
3783  context->WholeNumberToObject(1),
3784  context->NewStringFromAsciiz("Window"));
3785  return 0;
3786  }
3787  return touchline((WINDOW *)cself, SUBTRACTONE(start), cnt);
3788 }
3789 
3790 /**
3791  * Method: OrxCurTouchwin
3792  *
3793  * Mark window as changed.
3794  *
3795  * @return Zero.
3796  **/
3797 RexxMethod1(int, // Return type
3798  OrxCurTouchwin, // Object_method name
3799  CSELF, cself) // Self
3800 {
3801 
3802  if (cself == NULL) {
3803  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
3804  context->WholeNumberToObject(1),
3805  context->NewStringFromAsciiz("Window"));
3806  return 0;
3807  }
3808  return touchwin((WINDOW *)cself);
3809 }
3810 
3811 /**
3812  * Method: OrxCurTypeahead
3813  *
3814  * Set the typeahead for text input.
3815  *
3816  * @param fd Typeahead value.
3817  *
3818  * @return Zero.
3819  **/
3820 RexxMethod1(int, // Return type
3821  OrxCurTypeahead, // Object_method name
3822  int, fd)
3823 {
3824 
3825  return typeahead(fd);
3826 }
3827 
3828 /**
3829  * Method: OrxCurUnctrl
3830  *
3831  * Convert a control code to a ^code sequence.
3832  *
3833  * @param ch Code to convert.
3834  *
3835  * @return Zero.
3836  **/
3838  OrxCurUnctrl, // Object_method name
3839  int, ch)
3840 {
3841 
3842  return (RexxObjectPtr)context->NewStringFromAsciiz(unctrl((chtype)ch));
3843 }
3844 
3845 /**
3846  * Method: OrxCurUngetch
3847  *
3848  * Put a character into the keyboard buffer.
3849  *
3850  * @param ch Character to insert.
3851  *
3852  * @return Zero.
3853  **/
3854 RexxMethod1(int, // Return type
3855  OrxCurUngetch, // Object_method name
3856  CSTRING, ch)
3857 {
3858 
3859  return ungetch((int)*ch);
3860 }
3861 
3862 /**
3863  * Method: OrxCurUntouchwin
3864  *
3865  * Unmark window as changed.
3866  *
3867  * @return Zero.
3868  **/
3869 RexxMethod1(int, // Return type
3870  OrxCurUntouchwin, // Object_method name
3871  CSELF, cself) // Self
3872 {
3873 
3874  if (cself == NULL) {
3875  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
3876  context->WholeNumberToObject(1),
3877  context->NewStringFromAsciiz("Window"));
3878  return 0;
3879  }
3880  return untouchwin((WINDOW *)cself);
3881 }
3882 
3883 /**
3884  * Method: OrxCurUse_default_colors
3885  *
3886  * Use the default terminal colors.
3887  *
3888  * @return Zero.
3889  **/
3890 RexxMethod0(int, // Return type
3891  OrxCurUse_default_colors) // Object_method name
3892 {
3893 
3894  return use_default_colors();
3895 }
3896 
3897 /**
3898  * Method: OrxCurUse_env
3899  *
3900  * Use the default terminal colors.
3901  *
3902  * @return Zero.
3903  **/
3904 RexxMethod1(int, // Return type
3905  OrxCurUse_env, // Object_method name
3906  logical_t, bf)
3907 {
3908 
3909  use_env(bf);
3910  return 0;
3911 }
3912 
3913 /**
3914  * Method: OrxCurVline
3915  *
3916  * Draw a vertical line.
3917  *
3918  * @param ch chtype.
3919  *
3920  * @param n Number of rows.
3921  *
3922  * @return Zero.
3923  **/
3924 RexxMethod3(int, // Return type
3925  OrxCurVline, // Object_method name
3926  int, ch,
3927  int, n,
3928  CSELF, cself) // Self
3929 {
3930 
3931  if (cself == NULL) {
3932  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
3933  context->WholeNumberToObject(1),
3934  context->NewStringFromAsciiz("Window"));
3935  return 0;
3936  }
3937  return wvline((WINDOW *)cself, (chtype)ch, n);
3938 }
3939 
3940 /**
3941  * Method: OrxCurMvvline
3942  *
3943  * Draw a vertical line after moving the cursor.
3944  *
3945  * @param y New Y cursor position.
3946  *
3947  * @param x New X cursor position.
3948  *
3949  * @param ch chtype.
3950  *
3951  * @param n Number of rows.
3952  *
3953  * @return Zero.
3954  **/
3955 RexxMethod5(int, // Return type
3956  OrxCurMvvline, // Object_method name
3957  int, y,
3958  int, x,
3959  int, ch,
3960  int, n,
3961  CSELF, cself) // Self
3962 {
3963 
3964  if (cself == NULL) {
3965  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
3966  context->WholeNumberToObject(1),
3967  context->NewStringFromAsciiz("Window"));
3968  return 0;
3969  }
3970  return mvwvline((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x), (chtype)ch, n);
3971 }
3972 
3973 /**
3974  * Method: OrxCurWenclose
3975  *
3976  * Determine if a mouse click are within a window.
3977  *
3978  * @param y Y cursor screen position.
3979  *
3980  * @param x X cursor screen position.
3981  *
3982  * @return Zero.
3983  **/
3984 RexxMethod3(int, // Return type
3985  OrxCurWenclose, // Object_method name
3986  int, y,
3987  int, x,
3988  CSELF, cself) // Self
3989 {
3990 
3991  if (cself == NULL) {
3992  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
3993  context->WholeNumberToObject(1),
3994  context->NewStringFromAsciiz("Window"));
3995  return 0;
3996  }
3997  return wenclose((WINDOW *)cself, SUBTRACTONE(y), SUBTRACTONE(x));
3998 }
3999 
4000 /**
4001  * Method: OrxCurWnoutrefresh
4002  *
4003  * Copy modified text to the screen.
4004  *
4005  * @return Zero.
4006  **/
4007 RexxMethod1(int, // Return type
4008  OrxCurWnoutrefresh, // Object_method name
4009  CSELF, cself) // Self
4010 {
4011 
4012  if (cself == NULL) {
4013  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
4014  context->WholeNumberToObject(1),
4015  context->NewStringFromAsciiz("Window"));
4016  return 0;
4017  }
4018  return wnoutrefresh((WINDOW *)cself);
4019 }
4020 
4021 /**
4022  * Method: OrxCurWredrawln
4023  *
4024  * Redraw a line to the screen.
4025  *
4026  * @param beg Beginning line number.
4027  *
4028  * @param n Number of lines.
4029  *
4030  * @return Zero.
4031  **/
4032 RexxMethod3(int, // Return type
4033  OrxCurWredrawln, // Object_method name
4034  int, beg,
4035  int, n,
4036  CSELF, cself) // Self
4037 {
4038 
4039  if (cself == NULL) {
4040  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
4041  context->WholeNumberToObject(1),
4042  context->NewStringFromAsciiz("Window"));
4043  return 0;
4044  }
4045  return wredrawln((WINDOW *)cself, SUBTRACTONE(beg), n);
4046 }
4047 
4048 /**
4049  * Method: OrxCurWsyncdown
4050  *
4051  * Ensure subwindows are touched when the main window is
4052  * touched.
4053  *
4054  * @return Zero.
4055  **/
4056 RexxMethod1(int, // Return type
4057  OrxCurWsyncdown, // Object_method name
4058  CSELF, cself) // Self
4059 {
4060 
4061  if (cself == NULL) {
4062  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
4063  context->WholeNumberToObject(1),
4064  context->NewStringFromAsciiz("Window"));
4065  return 0;
4066  }
4067  wsyncdown((WINDOW *)cself);
4068  return 0;
4069 }
4070 
4071 /**
4072  * Method: OrxCurWsyncup
4073  *
4074  * Ensure parent windows are touched when the sub window is
4075  * touched.
4076  *
4077  * @return Zero.
4078  **/
4079 RexxMethod1(int, // Return type
4080  OrxCurWsyncup, // Object_method name
4081  CSELF, cself) // Self
4082 {
4083 
4084  if (cself == NULL) {
4085  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
4086  context->WholeNumberToObject(1),
4087  context->NewStringFromAsciiz("Window"));
4088  return 0;
4089  }
4090  wsyncup((WINDOW *)cself);
4091  return 0;
4092 }
4093 
4094 /**
4095  * Method: OrxCurWtouchln
4096  *
4097  * Mark one or more lines as changed.
4098  *
4099  * @param y Start line number.
4100  *
4101  * @param n Number of lines.
4102  *
4103  * @param bf Changed/Unchanged boolean.
4104  *
4105  * @return Zero.
4106  **/
4107 RexxMethod4(int, // Return type
4108  OrxCurWtouchln, // Object_method name
4109  int, y,
4110  int, n,
4111  logical_t, bf,
4112  CSELF, cself) // Self
4113 {
4114 
4115  if (cself == NULL) {
4116  context->RaiseException2(Rexx_Error_Incorrect_method_noclass,
4117  context->WholeNumberToObject(1),
4118  context->NewStringFromAsciiz("Window"));
4119  return 0;
4120  }
4121  return wtouchln((WINDOW *)cself, SUBTRACTONE(y), n, bf);
4122 }
4123 
4124 
4125 // build the actual function entry list
4128 };
4129 
4130 
4131 // build the actual method entry list
4133  REXX_METHOD(OrxCurVersion, OrxCurVersion),
4134  REXX_METHOD(OrxCurSetBase, OrxCurSetBase),
4135  REXX_METHOD(OrxCurInitscr, OrxCurInitscr),
4136  REXX_METHOD(OrxCurNewwin, OrxCurNewwin),
4137  REXX_METHOD(OrxCurNewwinfromptr, OrxCurNewwinfromptr),
4138  REXX_METHOD(OrxCurEndwin, OrxCurEndwin),
4139  REXX_METHOD(OrxCurRefresh, OrxCurRefresh),
4140  REXX_METHOD(OrxCurAddch, OrxCurAddch),
4141  REXX_METHOD(OrxCurMvaddch, OrxCurMvaddch),
4142  REXX_METHOD(OrxCurAddchstr, OrxCurAddchstr),
4143  REXX_METHOD(OrxCurMvaddchstr, OrxCurMvaddchstr),
4144  REXX_METHOD(OrxCurAddchnstr, OrxCurAddchnstr),
4145  REXX_METHOD(OrxCurMvaddchnstr, OrxCurMvaddchnstr),
4146  REXX_METHOD(OrxCurAddstr, OrxCurAddstr),
4147  REXX_METHOD(OrxCurMvaddstr, OrxCurMvaddstr),
4148  REXX_METHOD(OrxCurAddnstr, OrxCurAddnstr),
4149  REXX_METHOD(OrxCurMvaddnstr, OrxCurMvaddnstr),
4150  REXX_METHOD(OrxCurAssume_default_colors, OrxCurAssume_default_colors),
4151  REXX_METHOD(OrxCurAttroff, OrxCurAttroff),
4152  REXX_METHOD(OrxCurAttron, OrxCurAttron),
4153  REXX_METHOD(OrxCurAttrset, OrxCurAttrset),
4154  REXX_METHOD(OrxCurBaudrate, OrxCurBaudrate),
4155  REXX_METHOD(OrxCurBeep, OrxCurBeep),
4156  REXX_METHOD(OrxCurBkgd, OrxCurBkgd),
4157  REXX_METHOD(OrxCurBkgdset, OrxCurBkgdset),
4158  REXX_METHOD(OrxCurBorder, OrxCurBorder),
4159  REXX_METHOD(OrxCurAcs_map, OrxCurAcs_map),
4160  REXX_METHOD(OrxCurBox, OrxCurBox),
4161  REXX_METHOD(OrxCurCan_change_color, OrxCurCan_change_color),
4162  REXX_METHOD(OrxCurCbreak, OrxCurCbreak),
4163  REXX_METHOD(OrxCurNocbreak, OrxCurNocbreak),
4164  REXX_METHOD(OrxCurChgat, OrxCurChgat),
4165  REXX_METHOD(OrxCurMvchgat, OrxCurMvchgat),
4166  REXX_METHOD(OrxCurClear, OrxCurClear),
4167  REXX_METHOD(OrxCurClearok, OrxCurClearok),
4168  REXX_METHOD(OrxCurClrtobot, OrxCurClrtobot),
4169  REXX_METHOD(OrxCurClrtoeol, OrxCurClrtoeol),
4170  REXX_METHOD(OrxCurColor_set, OrxCurColor_set),
4171  REXX_METHOD(OrxCurColors, OrxCurColors),
4172  REXX_METHOD(OrxCurColor_pair, OrxCurColor_pair),
4173  REXX_METHOD(OrxCurColor_pairs, OrxCurColor_pairs),
4174  REXX_METHOD(OrxCurCols, OrxCurCols),
4175  REXX_METHOD(OrxCurCopywin, OrxCurCopywin),
4176  REXX_METHOD(OrxCurCurs_set, OrxCurCurs_set),
4177  REXX_METHOD(OrxCurCurses_version, OrxCurCurses_version),
4178  REXX_METHOD(OrxCurDelch, OrxCurDelch),
4179  REXX_METHOD(OrxCurDeleteln, OrxCurDeleteln),
4180  REXX_METHOD(OrxCurDelwin, OrxCurDelwin),
4181  REXX_METHOD(OrxCurDerwinprivate, OrxCurDerwinprivate),
4182  REXX_METHOD(OrxCurDupwinprivate, OrxCurDupwinprivate),
4183  REXX_METHOD(OrxCurDoupdate, OrxCurDoupdate),
4184  REXX_METHOD(OrxCurEcho, OrxCurEcho),
4185  REXX_METHOD(OrxCurNoecho, OrxCurNoecho),
4186  REXX_METHOD(OrxCurErase, OrxCurErase),
4187  REXX_METHOD(OrxCurErasechar, OrxCurErasechar),
4188  REXX_METHOD(OrxCurEchochar, OrxCurEchochar),
4189  REXX_METHOD(OrxCurFilter, OrxCurFilter),
4190  REXX_METHOD(OrxCurFlash, OrxCurFlash),
4191  REXX_METHOD(OrxCurFlushinp, OrxCurFlushinp),
4192  REXX_METHOD(OrxCurGetbegyx, OrxCurGetbegyx),
4193  REXX_METHOD(OrxCurGetbkgd, OrxCurGetbkgd),
4194  REXX_METHOD(OrxCurGetch, OrxCurGetch),
4195  REXX_METHOD(OrxCurMvgetch, OrxCurMvgetch),
4196  REXX_METHOD(OrxCurGetmaxyx, OrxCurGetmaxyx),
4197  REXX_METHOD(OrxCurGetparyx, OrxCurGetparyx),
4198  REXX_METHOD(OrxCurGetmouseprivate, OrxCurGetmouseprivate),
4199  REXX_METHOD(OrxCurGetstr, OrxCurGetstr),
4200  REXX_METHOD(OrxCurGetnstr, OrxCurGetnstr),
4201  REXX_METHOD(OrxCurMvgetstr, OrxCurMvgetstr),
4202  REXX_METHOD(OrxCurMvgetnstr, OrxCurMvgetnstr),
4203  REXX_METHOD(OrxCurGetwinprivate, OrxCurGetwinprivate),
4204  REXX_METHOD(OrxCurGetyx, OrxCurGetyx),
4205  REXX_METHOD(OrxCurHalfdelay, OrxCurHalfdelay),
4206  REXX_METHOD(OrxCurHas_colors, OrxCurHas_colors),
4207  REXX_METHOD(OrxCurHas_ic, OrxCurHas_ic),
4208  REXX_METHOD(OrxCurHas_il, OrxCurHas_il),
4209  REXX_METHOD(OrxCurHline, OrxCurHline),
4210  REXX_METHOD(OrxCurMvhline, OrxCurMvhline),
4211  REXX_METHOD(OrxCurIdcok, OrxCurIdcok),
4212  REXX_METHOD(OrxCurIdlok, OrxCurIdlok),
4213  REXX_METHOD(OrxCurImmedok, OrxCurImmedok),
4214  REXX_METHOD(OrxCurInch, OrxCurInch),
4215  REXX_METHOD(OrxCurMvinch, OrxCurMvinch),
4216  REXX_METHOD(OrxCurInchstr, OrxCurInchstr),
4217  REXX_METHOD(OrxCurMvinchstr, OrxCurMvinchstr),
4218  REXX_METHOD(OrxCurInchnstr, OrxCurInchstr),
4219  REXX_METHOD(OrxCurMvinchnstr, OrxCurMvinchnstr),
4220  REXX_METHOD(OrxCurInit_color, OrxCurInit_color),
4221  REXX_METHOD(OrxCurInit_pair, OrxCurInit_pair),
4222  REXX_METHOD(OrxCurInsch, OrxCurInsch),
4223  REXX_METHOD(OrxCurMvinsch, OrxCurMvinsch),
4224  REXX_METHOD(OrxCurInsdelln, OrxCurInsdelln),
4225  REXX_METHOD(OrxCurInsertln, OrxCurInsertln),
4226  REXX_METHOD(OrxCurInsstr, OrxCurInsstr),
4227  REXX_METHOD(OrxCurInsnstr, OrxCurInsnstr),
4228  REXX_METHOD(OrxCurMvinsstr, OrxCurMvinsstr),
4229  REXX_METHOD(OrxCurMvinsnstr, OrxCurMvinsnstr),
4230  REXX_METHOD(OrxCurInstr, OrxCurInstr),
4231  REXX_METHOD(OrxCurInnstr, OrxCurInnstr),
4232  REXX_METHOD(OrxCurMvinstr, OrxCurMvinstr),
4233  REXX_METHOD(OrxCurMvinnstr, OrxCurMvinnstr),
4234  REXX_METHOD(OrxCurIntrflush, OrxCurIntrflush),
4235  REXX_METHOD(OrxCurIsbitset, OrxCurIsbitset),
4236  REXX_METHOD(OrxCurIsendwin, OrxCurIsendwin),
4237  REXX_METHOD(OrxCurIs_linetouched, OrxCurIs_linetouched),
4238  REXX_METHOD(OrxCurIs_wintouched, OrxCurIs_wintouched),
4239  REXX_METHOD(OrxCurKeyname, OrxCurKeyname),
4240  REXX_METHOD(OrxCurKeypad, OrxCurKeypad),
4241  REXX_METHOD(OrxCurKillchar, OrxCurKillchar),
4242  REXX_METHOD(OrxCurLeaveok, OrxCurLeaveok),
4243  REXX_METHOD(OrxCurLines, OrxCurLines),
4244  REXX_METHOD(OrxCurLongname, OrxCurLongname),
4245  REXX_METHOD(OrxCurMeta, OrxCurMeta),
4246  REXX_METHOD(OrxCurMouse_trafo, OrxCurMouse_trafo),
4247  REXX_METHOD(OrxCurMousemask, OrxCurMousemask),
4248  REXX_METHOD(OrxCurMove, OrxCurMove),
4249  REXX_METHOD(OrxCurMvderwin, OrxCurMvderwin),
4250  REXX_METHOD(OrxCurMvwin, OrxCurMvwin),
4251  REXX_METHOD(OrxCurNapms, OrxCurNapms),
4252  REXX_METHOD(OrxCurNcurses_mouse_version, OrxCurNcurses_mouse_version),
4253  REXX_METHOD(OrxCurNcurses_version, OrxCurNcurses_version),
4254  REXX_METHOD(OrxCurNewpad, OrxCurNewpad),
4255  REXX_METHOD(OrxCurNl, OrxCurNl),
4256  REXX_METHOD(OrxCurNonl, OrxCurNonl),
4257  REXX_METHOD(OrxCurNodelay, OrxCurNodelay),
4258  REXX_METHOD(OrxCurNotimeout, OrxCurNotimeout),
4259  REXX_METHOD(OrxCurOverlay, OrxCurOverlay),
4260  REXX_METHOD(OrxCurOverwrite, OrxCurOverwrite),
4261  REXX_METHOD(OrxCurPair_content, OrxCurPair_content),
4262  REXX_METHOD(OrxCurPair_number, OrxCurPair_number),
4263  REXX_METHOD(OrxCurPechochar, OrxCurPechochar),
4264  REXX_METHOD(OrxCurPnoutrefresh, OrxCurPnoutrefresh),
4265  REXX_METHOD(OrxCurPrefresh, OrxCurPrefresh),
4266  REXX_METHOD(OrxCurPutwin, OrxCurPutwin),
4267  REXX_METHOD(OrxCurQiflush, OrxCurQiflush),
4268  REXX_METHOD(OrxCurNoqiflush, OrxCurNoqiflush),
4269  REXX_METHOD(OrxCurRaw, OrxCurRaw),
4270  REXX_METHOD(OrxCurNoraw, OrxCurNoraw),
4271  REXX_METHOD(OrxCurRedrawwin, OrxCurRedrawwin),
4272  REXX_METHOD(OrxCurScr_dump, OrxCurScr_dump),
4273  REXX_METHOD(OrxCurScr_restore, OrxCurScr_restore),
4274  REXX_METHOD(OrxCurScrl, OrxCurScrl),
4275  REXX_METHOD(OrxCurScroll, OrxCurScroll),
4276  REXX_METHOD(OrxCurScrollok, OrxCurScrollok),
4277  REXX_METHOD(OrxCurSetscrreg, OrxCurSetscrreg),
4278  REXX_METHOD(OrxCurSlk_attr, OrxCurSlk_attr),
4279  REXX_METHOD(OrxCurSlk_attroff, OrxCurSlk_attroff),
4280  REXX_METHOD(OrxCurSlk_attron, OrxCurSlk_attron),
4281  REXX_METHOD(OrxCurSlk_attrset, OrxCurSlk_attrset),
4282  REXX_METHOD(OrxCurSlk_clear, OrxCurSlk_clear),
4283  REXX_METHOD(OrxCurSlk_color, OrxCurSlk_color),
4284  REXX_METHOD(OrxCurSlk_init, OrxCurSlk_init),
4285  REXX_METHOD(OrxCurSlk_label, OrxCurSlk_label),
4286  REXX_METHOD(OrxCurSlk_noutrefresh, OrxCurSlk_noutrefresh),
4287  REXX_METHOD(OrxCurSlk_refresh, OrxCurSlk_refresh),
4288  REXX_METHOD(OrxCurSlk_restore, OrxCurSlk_restore),
4289  REXX_METHOD(OrxCurSlk_set, OrxCurSlk_set),
4290  REXX_METHOD(OrxCurSlk_touch, OrxCurSlk_touch),
4291  REXX_METHOD(OrxCurStandend, OrxCurStandend),
4292  REXX_METHOD(OrxCurStandout, OrxCurStandout),
4293  REXX_METHOD(OrxCurStart_color, OrxCurStart_color),
4294  REXX_METHOD(OrxCurSubwinprivate, OrxCurSubwinprivate),
4295  REXX_METHOD(OrxCurSubpadprivate, OrxCurSubpadprivate),
4296  REXX_METHOD(OrxCurSyncok, OrxCurSyncok),
4297  REXX_METHOD(OrxCurTabsize, OrxCurTabsize),
4298  REXX_METHOD(OrxCurTermattrs, OrxCurTermattrs),
4299  REXX_METHOD(OrxCurTermname, OrxCurTermname),
4300  REXX_METHOD(OrxCurTimeout, OrxCurTimeout),
4301  REXX_METHOD(OrxCurTouchline, OrxCurTouchline),
4302  REXX_METHOD(OrxCurTouchwin, OrxCurTouchwin),
4303  REXX_METHOD(OrxCurTypeahead, OrxCurTypeahead),
4304  REXX_METHOD(OrxCurUnctrl, OrxCurUnctrl),
4305  REXX_METHOD(OrxCurUngetch, OrxCurUngetch),
4306  REXX_METHOD(OrxCurUntouchwin, OrxCurUntouchwin),
4307  REXX_METHOD(OrxCurUse_default_colors, OrxCurUse_default_colors),
4308  REXX_METHOD(OrxCurUse_env, OrxCurUse_env),
4309  REXX_METHOD(OrxCurVline, OrxCurVline),
4310  REXX_METHOD(OrxCurMvvline, OrxCurMvvline),
4311  REXX_METHOD(OrxCurWenclose, OrxCurWenclose),
4312  REXX_METHOD(OrxCurWnoutrefresh, OrxCurWnoutrefresh),
4313  REXX_METHOD(OrxCurWredrawln, OrxCurWredrawln),
4314  REXX_METHOD(OrxCurWsyncdown, OrxCurWsyncdown),
4315  REXX_METHOD(OrxCurWsyncup, OrxCurWsyncup),
4316  REXX_METHOD(OrxCurWtouchln, OrxCurWtouchln),
4318 };
4319 
4320 
4323  REXX_INTERPRETER_4_0_0, // anything after 4.0.0 will work
4324  "orxncurses", // name of the package
4325  VERSTRING(VMAJOR,VMINOR,VREL), // package information
4326  NULL, // no load functions
4327  NULL, // no unload functions
4328  orxcur_routines, // the exported routines
4329  orxcur_methods // the exported methods
4330 };
4331 
4332 // package loading stub.
4334 
#define nl
#define argumentExists(i)
Definition: oorexxapi.h:3777
#define REXX_INTERPRETER_4_0_0
Definition: oorexxapi.h:216
void * CSELF
Definition: oorexxapi.h:4329
#define REXX_METHOD(n, e)
Definition: oorexxapi.h:211
#define REXX_LAST_ROUTINE()
Definition: oorexxapi.h:193
#define REXX_LAST_METHOD()
Definition: oorexxapi.h:212
#define STANDARD_PACKAGE_HEADER
Definition: oorexxapi.h:230
#define Rexx_Error_Incorrect_method_noclass
Definition: oorexxerrors.h:567
RexxMethod4(int, OrxCurNewwin, int, nlines, int, ncols, int, begin_y, int, begin_x)
Definition: orxncurses.cpp:131
RexxMethodEntry orxcur_methods[]
#define ADDONE(x)
Definition: orxncurses.cpp:58
RexxMethod6(int, OrxCurMvchgat, int, y, int, x, int, n, int, attr, int, color, CSELF, cself)
Definition: orxncurses.cpp:830
#define VERSTRING(major, minor, rel)
Definition: orxncurses.cpp:55
RexxMethod7(int, OrxCurPnoutrefresh, int, minrow, int, mincol, int, sminrow, int, smincol, int, smaxrow, int, smaxcol, CSELF, cself)
RexxMethod0(RexxObjectPtr, OrxCurVersion)
Definition: orxncurses.cpp:72
RexxMethod3(int, OrxCurAddchnstr, CSTRING, str, int, n, CSELF, cself)
Definition: orxncurses.cpp:318
RexxRoutineEntry orxcur_routines[]
RexxPackageEntry orxcur_package_entry
bool onebased
Definition: orxncurses.cpp:57
OOREXX_GET_PACKAGE(orxcur)
RexxMethod9(int, OrxCurBorder, int, ls, int, rs, int, ts, int, bs, int, tl, int, tr, int, bl, int, br, CSELF, cself)
Definition: orxncurses.cpp:674
RexxMethod1(logical_t, OrxCurSetBase, OPTIONAL_logical_t, base)
Definition: orxncurses.cpp:89
RexxMethod5(int, OrxCurMvaddchnstr, int, y, int, x, CSTRING, str, int, n, CSELF, cself)
Definition: orxncurses.cpp:350
#define SUBTRACTONE(x)
Definition: orxncurses.cpp:59
RexxMethod2(int, OrxCurAddch, CSTRING, str, CSELF, cself)
Definition: orxncurses.cpp:207
const char * CSTRING
Definition: rexx.h:78
size_t logical_t
Definition: rexx.h:231
struct _RexxBufferStringObject * RexxBufferStringObject
Definition: rexx.h:129
struct _RexxObjectPtr * RexxObjectPtr
Definition: rexx.h:127
void * POINTER
Definition: rexx.h:79
Definition: oorexxapi.h:198
Definition: oorexxapi.h:242
Definition: oorexxapi.h:177
int int32_t