OpenCores
URL https://opencores.org/ocsvn/riscv_vhdl/riscv_vhdl/trunk

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [debugger/] [src/] [common/] [coreservices/] [iautocomplete.h] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 sergeykhbr
/**
2
 * @file
3
 * @copyright  Copyright 2016 GNSS Sensor Ltd. All right reserved.
4
 * @author     Sergey Khabarov - sergeykhbr@gmail.com
5
 * @brief      Autocompleter's interface.
6
 */
7
 
8
#ifndef __DEBUGGER_IAUTOCOMPLETE_H__
9
#define __DEBUGGER_IAUTOCOMPLETE_H__
10
 
11
#include "iface.h"
12
#include "attribute.h"
13
 
14
namespace debugger {
15
 
16
static const char *IFACE_AUTO_COMPLETE = "IAutoComplete";
17
 
18
/** Qt Compatible Virtual Keys */
19
#if defined(_WIN32) || defined(__CYGWIN__)
20
static const uint32_t KB_Backspace = 0x0008;
21
static const uint32_t KB_Tab = 0x0009;
22
static const uint32_t KB_Return = 0x000d;
23
static const uint32_t KB_Shift = 0x0010;
24
static const uint32_t KB_Control = 0x0011;
25
static const uint32_t KB_Alt = 0x0012;
26
static const uint32_t KB_Escape = 0x001b;
27
static const uint32_t KB_PageUp = 0x0021;
28
static const uint32_t KB_PageDown = 0x0022;
29
static const uint32_t KB_End = 0x0023;
30
static const uint32_t KB_Home = 0x0024;
31
static const uint32_t KB_Left = 0x0025;
32
static const uint32_t KB_Up = 0x0026;
33
static const uint32_t KB_Right = 0x0027;
34
static const uint32_t KB_Down = 0x0028;
35
static const uint32_t KB_Delete = 0x002e;
36
static const uint32_t KB_Dot = 0x00be;
37
#else
38
static const uint32_t KB_Backspace = 0xff08;
39
static const uint32_t KB_Tab = 0xff09;
40
static const uint32_t KB_Return = 0xff0d;
41
static const uint32_t KB_Shift = 0xffe1;
42
static const uint32_t KB_Control = 0xffe3;
43
static const uint32_t KB_Alt = 0xffe9;
44
static const uint32_t KB_Escape = 0xff1b;
45
static const uint32_t KB_PageUp = 0xff25;
46
static const uint32_t KB_PageDown = 0xffe4;
47
//static const uint32_t KB_End = 0x0000;
48
//static const uint32_t KB_Home = 0x0000;
49
static const uint32_t KB_Left = 0xff23;
50
static const uint32_t KB_Up = 0xff26;
51
static const uint32_t KB_Right = 0xff22;
52
static const uint32_t KB_Down = 0xff8d;
53
static const uint32_t KB_Delete = 0xff61;
54
static const uint32_t KB_Dot = 0x002e;
55
#endif
56
 
57
 
58
class IAutoComplete : public IFace {
59
public:
60
    IAutoComplete() : IFace(IFACE_AUTO_COMPLETE) {}
61
 
62
    /**
63
     * @return New command ready flag
64
     */
65
    virtual bool processKey(uint32_t qt_key, AttributeType *cmd,
66
                            AttributeType *cursor) =0;
67
};
68
 
69
}  // namespace debugger
70
 
71
#endif  // __DEBUGGER_IAUTOCOMPLETE_H__

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.