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
19class 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
32};
33
34} // namespace rime
35
36#endif // RIME_KEY_BINDER_H_
Definition algebra.cc:12
std::unique_ptr< T > the
Definition common.h:58
ProcessResult
Definition processor.h:18
Definition key_binder.cc:48
Definition key_binder.cc:56
bool ReinterpretPagingKey(const KeyEvent &key_event)
Definition key_binder.cc:309
the< KeyBindings > key_bindings_
Definition key_binder.h:29
KeyBinder(const Ticket &ticket)
Definition key_binder.cc:235
virtual ProcessResult ProcessKeyEvent(const KeyEvent &key_event)
Definition key_binder.cc:271
bool redirecting_
Definition key_binder.h:30
void LoadConfig()
Definition key_binder.cc:301
void PerformKeyBinding(const KeyBinding &binding)
Definition key_binder.cc:289
int last_key_
Definition key_binder.h:31
Definition key_event.h:17
Processor(const Ticket &ticket)
Definition processor.h:26
Definition ticket.h:17