Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Side by Side Diff: ui/base/ime/ibus_client.h

Issue 10534134: Fix candidate window position issue. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix braces Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_BASE_IME_IBUS_CLIENT_H_ 5 #ifndef UI_BASE_IME_IBUS_CLIENT_H_
6 #define UI_BASE_IME_IBUS_CLIENT_H_ 6 #define UI_BASE_IME_IBUS_CLIENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <glib/gtypes.h> 9 #include <glib/gtypes.h>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/event_types.h" 12 #include "base/event_types.h"
13 #include "base/string16.h" 13 #include "base/string16.h"
14 #include "ui/base/events.h" 14 #include "ui/base/events.h"
15 #include "ui/base/ui_export.h" 15 #include "ui/base/ui_export.h"
16 16
17 typedef struct _IBusBus IBusBus; 17 typedef struct _IBusBus IBusBus;
18 typedef struct _IBusInputContext IBusInputContext; 18 typedef struct _IBusInputContext IBusInputContext;
19 typedef struct _IBusText IBusText; 19 typedef struct _IBusText IBusText;
20 20
21 namespace gfx {
22 class Rect;
23 } // namespace gfx
21 namespace ui { 24 namespace ui {
22 25
23 struct CompositionText; 26 struct CompositionText;
24 27
25 namespace internal { 28 namespace internal {
26 29
27 // An interface implemented by the object that sends and receives an event to 30 // An interface implemented by the object that sends and receives an event to
28 // and from ibus-daemon. 31 // and from ibus-daemon.
29 class UI_EXPORT IBusClient { 32 class UI_EXPORT IBusClient {
30 public: 33 public:
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // Blurs the |context| asynchronously. 93 // Blurs the |context| asynchronously.
91 virtual void FocusOut(IBusInputContext* context) = 0; 94 virtual void FocusOut(IBusInputContext* context) = 0;
92 // Resets the |context| asynchronously. 95 // Resets the |context| asynchronously.
93 virtual void Reset(IBusInputContext* context) = 0; 96 virtual void Reset(IBusInputContext* context) = 0;
94 97
95 // Returns the current input method type. 98 // Returns the current input method type.
96 virtual InputMethodType GetInputMethodType() = 0; 99 virtual InputMethodType GetInputMethodType() = 0;
97 100
98 // Resets the cursor location asynchronously. 101 // Resets the cursor location asynchronously.
99 virtual void SetCursorLocation(IBusInputContext* context, 102 virtual void SetCursorLocation(IBusInputContext* context,
100 int32 x, 103 const gfx::Rect& cursor_location,
101 int32 y, 104 const gfx::Rect& composition_head) = 0;
102 int32 w,
103 int32 h) = 0;
104 105
105 // Sends the key to ibus-daemon asynchronously. 106 // Sends the key to ibus-daemon asynchronously.
106 virtual void SendKeyEvent(IBusInputContext* context, 107 virtual void SendKeyEvent(IBusInputContext* context,
107 uint32 keyval, 108 uint32 keyval,
108 uint32 keycode, 109 uint32 keycode,
109 uint32 state, 110 uint32 state,
110 PendingKeyEvent* pending_key) = 0; 111 PendingKeyEvent* pending_key) = 0;
111 112
112 // Called by InputMethodIBus::OnUpdatePreeditText to convert |text| into a 113 // Called by InputMethodIBus::OnUpdatePreeditText to convert |text| into a
113 // CompositionText. 114 // CompositionText.
114 virtual void ExtractCompositionText(IBusText* text, 115 virtual void ExtractCompositionText(IBusText* text,
115 guint cursor_position, 116 guint cursor_position,
116 CompositionText* out_composition) = 0; 117 CompositionText* out_composition) = 0;
117 118
118 // Called by InputMethodIBus::OnCommitText to convert |text| into a Unicode 119 // Called by InputMethodIBus::OnCommitText to convert |text| into a Unicode
119 // string. 120 // string.
120 virtual string16 ExtractCommitText(IBusText* text) = 0; 121 virtual string16 ExtractCommitText(IBusText* text) = 0;
121 }; 122 };
122 123
123 } // namespace internal 124 } // namespace internal
124 } // namespace ui 125 } // namespace ui
125 126
126 #endif // UI_BASE_IME_IBUS_CLIENT_H_ 127 #endif // UI_BASE_IME_IBUS_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/input_method/ibus_ui_controller.cc ('k') | ui/base/ime/ibus_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698