librime: key_binder.h Source File

| librime 1.2 Rime Input Method Engine, the core library

key_binder.h
Go to the documentation of this file.
1//
2// Copyright RIME Developers
3// Distributed under the BSD License
4//
5// 2011-11-23 GONG Chen <chen.sst@gmail.com>
6//
7#ifndef RIME_KEY_BINDER_H_
8#define RIME_KEY_BINDER_H_
9
10#include <rime/common.h>
11#include <rime/component.h>
12#include <rime/processor.h>
13
14namespace rime {
15
16struct KeyBinding;
17class KeyBindings;
18
19 class KeyBinder : public Processor {
20 public:
21 KeyBinder(const Ticket& ticket);
22 virtual ProcessResult ProcessKeyEvent(const KeyEvent& key_event);
23
24 protected:
25 void LoadConfig();
26 bool ReinterpretPagingKey(const KeyEvent& key_event);
27 void PerformKeyBinding(const KeyBinding& binding);
28
29 the<KeyBindings> key_bindings_;
30 bool redirecting_;
31 int last_key_;
32};
33
34} // namespace rime
35
36#endif // RIME_KEY_BINDER_H_
common.h
component.h
processor.h
rime
Definition algebra.cc:12
rime::the
std::unique_ptr< T > the
Definition common.h:58
rime::ProcessResult
ProcessResult
Definition processor.h:18
rime::KeyBinding
Definition key_binder.cc:48
rime::KeyBindings
Definition key_binder.cc:56
rime::KeyBinder::ReinterpretPagingKey
bool ReinterpretPagingKey(const KeyEvent &key_event)
Definition key_binder.cc:309
rime::KeyBinder::key_bindings_
the< KeyBindings > key_bindings_
Definition key_binder.h:29
rime::KeyBinder::KeyBinder
KeyBinder(const Ticket &ticket)
Definition key_binder.cc:235
rime::KeyBinder::ProcessKeyEvent
virtual ProcessResult ProcessKeyEvent(const KeyEvent &key_event)
Definition key_binder.cc:271
rime::KeyBinder::redirecting_
bool redirecting_
Definition key_binder.h:30
rime::KeyBinder::LoadConfig
void LoadConfig()
Definition key_binder.cc:301
rime::KeyBinder::PerformKeyBinding
void PerformKeyBinding(const KeyBinding &binding)
Definition key_binder.cc:289
rime::KeyBinder::last_key_
int last_key_
Definition key_binder.h:31
rime::KeyEvent
Definition key_event.h:17
rime::Processor::Processor
Processor(const Ticket &ticket)
Definition processor.h:26
rime::Ticket
Definition ticket.h:17