OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ | 5 #ifndef CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ |
6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ | 6 #define CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ |
7 | 7 |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 gint count, | 153 gint count, |
154 gboolean extend_selection, | 154 gboolean extend_selection, |
155 gpointer self) { | 155 gpointer self) { |
156 reinterpret_cast<AutocompleteEditViewGtk*>(self)-> | 156 reinterpret_cast<AutocompleteEditViewGtk*>(self)-> |
157 HandleViewMoveCursor(step, count, extend_selection); | 157 HandleViewMoveCursor(step, count, extend_selection); |
158 } | 158 } |
159 void HandleViewMoveCursor(GtkMovementStep step, | 159 void HandleViewMoveCursor(GtkMovementStep step, |
160 gint count, | 160 gint count, |
161 gboolean extendion_selection); | 161 gboolean extendion_selection); |
162 | 162 |
163 static gboolean HandleViewSizeRequestThunk(GtkWidget* view, | 163 static void HandleViewSizeRequestThunk(GtkWidget* view, |
164 GtkRequisition* req, | 164 GtkRequisition* req, |
165 gpointer self) { | 165 gpointer self) { |
166 return reinterpret_cast<AutocompleteEditViewGtk*>(self)-> | 166 reinterpret_cast<AutocompleteEditViewGtk*>(self)-> |
167 HandleViewSizeRequest(req); | 167 HandleViewSizeRequest(req); |
168 } | 168 } |
169 gboolean HandleViewSizeRequest(GtkRequisition* req); | 169 void HandleViewSizeRequest(GtkRequisition* req); |
170 | 170 |
171 // Get the character indices of the current selection. This honors | 171 // Get the character indices of the current selection. This honors |
172 // direction, cp_max is the insertion point, and cp_min is the bound. | 172 // direction, cp_max is the insertion point, and cp_min is the bound. |
173 CharRange GetSelection(); | 173 CharRange GetSelection(); |
174 | 174 |
175 // Translate from character positions to iterators for the current buffer. | 175 // Translate from character positions to iterators for the current buffer. |
176 void ItersFromCharRange(const CharRange& range, | 176 void ItersFromCharRange(const CharRange& range, |
177 GtkTextIter* iter_min, | 177 GtkTextIter* iter_min, |
178 GtkTextIter* iter_max); | 178 GtkTextIter* iter_max); |
179 | 179 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 ToolbarModel::SecurityLevel scheme_security_level_; | 216 ToolbarModel::SecurityLevel scheme_security_level_; |
217 | 217 |
218 // Tracking state before and after a possible change. | 218 // Tracking state before and after a possible change. |
219 std::wstring text_before_change_; | 219 std::wstring text_before_change_; |
220 CharRange sel_before_change_; | 220 CharRange sel_before_change_; |
221 | 221 |
222 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk); | 222 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk); |
223 }; | 223 }; |
224 | 224 |
225 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ | 225 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ |
OLD | NEW |