Correct backtrace() array size argument
[forms.git] / F / F_Linux_Console_UI.H
blob6d44bb0f9438bf63ca8b996408b505b885641815
2  /*
3   *   Copyright (C) 2007, Harbour, All rights reserved.
4   */
6 #ifndef _F_LINUX_CONSOLE_UI_H_
7 #define _F_LINUX_CONSOLE_UI_H_
9 #include <F_UI.H>
10 #include <F_Gpm.H>
11 #include <F_Linux_Input.H>
12 #include <F_Linux_Keyboard.H>
13 #include <F_Linux_Console_Display.H>
15 namespace F {
17 /*! The simple console ui implemetation
18  */
20  class F_Linux_Console_UI : public F_UI {
22    F_Input_Device *mouse; // gpm, ÂÕÄØ ÏΠÎÅÌÁÄÅΠ...
23    F_Input_Device *input; // Linux input subsystem (mouse / keyboard / etc.)
24    F_Linux_Console_Display *display;
25    std::vector <F_Event_t> event_queue;
26 //   F_Event_t last_kbd_ev, last_mouse_ev;
27    F_Color cursor_;
28    
29    bool probe();
30    void run(void);
31    void initial();
32    
33   public:
35    F_Linux_Console_UI(unsigned char ui_priority = 0) :
36      F_UI(CONSOLE_UI, ui_priority) {
37 //       memset(&last_kbd_ev, 0, sizeof(F_Event_t));
38 //       memset(&last_mouse_ev, 0, sizeof(F_Event_t));
39        display = 0;
40        mouse = 0;
41        input = 0;
42    }
43    ~F_Linux_Console_UI();
44    void init(void) { }
45    void sigstop();
46    void sigcont();
47    void sigwinch();
48    void sigsegv() { sigsegv_ = true; }
49    void shutdown() {
50      if (cleaned_up_)
51        return;
52      // restore display area from back_store
53      if (display && !sigsegv_)
54        display->restore();
55      delete display;
56      delete mouse;
57      delete input;
58      cleaned_up_ = true;
59   }
60    bool exit_confirm(bool from_sighandler);
62    void refresh();
64    int get_key() {
65 //     int key = last_kbd_ev.kbd.key;
66 //     last_kbd_ev.kbd.key = 0;
67 //     return key;
68     return 0;
69    }
71  };
72 } // namespace F
74 #endif