1 /**
2  * @namespace   biew_addons
3  * @file        addons/sys/kbdview.c
4  * @brief       This file contains simple implementation console information.
5  * @version     -
6  * @remark      this source file is part of Binary vIEW project (BIEW).
7  *              The Binary vIEW (BIEW) is copyright (C) 1995 Nickols_K.
8  *              All rights reserved. This software is redistributable under the
9  *              licence given in the file "Licence.en" ("Licence.ru" in russian
10  *              translation) distributed in the BIEW archive.
11  * @note        Requires POSIX compatible development system
12  *
13  * @author      Nickols_K
14  * @since       2003
15  * @note        Development, fixes and improvements
16 **/
17 #include <string.h>
18 #include <stddef.h>
19 
20 #include "colorset.h"
21 #include "bconsole.h"
22 #include "biewutil.h"
23 #include "reg_form.h"
24 #include "biewlib/biewlib.h"
25 #include "biewlib/kbd_code.h"
26 
InputViewLoop(void)27 static void InputViewLoop( void )
28 {
29   TWindow * hwnd = CrtDlgWndnls(" Input viewer ",78,2);
30   int rval, do_exit;
31   char head[80], text[80];
32   drawEmptyPrompt();
33   twUseWin(hwnd);
34   twFreezeWin(hwnd);
35   twSetFooterAttr(hwnd," [Escape] - quit ",TW_TMODE_RIGHT,dialog_cset.selfooter);
36   twRefreshWin(hwnd);
37   do_exit=0;
38   do
39   {
40     rval = __inputRawInfo(head,text);
41     if(rval==-1)
42     {
43 	ErrMessageBox("Not implemented yet!",NULL);
44 	break;
45     }
46     twGotoXY(1,1);
47     twPutS(head);
48     twClrEOL();
49     twGotoXY(1,2);
50     twPutS(text);
51     twClrEOL();
52     if(!rval) do_exit++;
53   }
54   while(do_exit<2);
55   CloseWnd(hwnd);
56 }
57 
58 REGISTRY_SYSINFO InputViewer =
59 {
60   "~Input viewer",
61   InputViewLoop,
62   NULL,
63   NULL
64 };
65 
66