| 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 <string> | 10 #include <string> |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 void HandleInsertText(GtkTextBuffer* buffer, | 264 void HandleInsertText(GtkTextBuffer* buffer, |
| 265 GtkTextIter* location, | 265 GtkTextIter* location, |
| 266 const gchar* text, | 266 const gchar* text, |
| 267 gint len); | 267 gint len); |
| 268 | 268 |
| 269 static void HandleBackSpaceThunk(GtkTextView* text_view, gpointer self) { | 269 static void HandleBackSpaceThunk(GtkTextView* text_view, gpointer self) { |
| 270 reinterpret_cast<AutocompleteEditViewGtk*>(self)->HandleBackSpace(); | 270 reinterpret_cast<AutocompleteEditViewGtk*>(self)->HandleBackSpace(); |
| 271 } | 271 } |
| 272 void HandleBackSpace(); | 272 void HandleBackSpace(); |
| 273 | 273 |
| 274 static void HandleCopyClipboardThunk(GtkTextView* text_view, gpointer self) { |
| 275 reinterpret_cast<AutocompleteEditViewGtk*>(self)->HandleCopyClipboard(); |
| 276 } |
| 277 void HandleCopyClipboard(); |
| 278 |
| 274 // Actual implementation of SelectAll(), but also provides control over | 279 // Actual implementation of SelectAll(), but also provides control over |
| 275 // whether the PRIMARY selection is set to the selected text (in SelectAll(), | 280 // whether the PRIMARY selection is set to the selected text (in SelectAll(), |
| 276 // it isn't, but we want set the selection when the user clicks in the entry). | 281 // it isn't, but we want set the selection when the user clicks in the entry). |
| 277 void SelectAllInternal(bool reversed, bool update_primary_selection); | 282 void SelectAllInternal(bool reversed, bool update_primary_selection); |
| 278 | 283 |
| 279 // Get ready to update |text_buffer_|'s highlighting without making changes to | 284 // Get ready to update |text_buffer_|'s highlighting without making changes to |
| 280 // the PRIMARY selection. Removes the clipboard from |text_buffer_| and | 285 // the PRIMARY selection. Removes the clipboard from |text_buffer_| and |
| 281 // blocks the "mark-set" signal handler. | 286 // blocks the "mark-set" signal handler. |
| 282 void StartUpdatingHighlightedText(); | 287 void StartUpdatingHighlightedText(); |
| 283 | 288 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 | 381 |
| 377 // If a character is inserted, store it in this variable so that it can | 382 // If a character is inserted, store it in this variable so that it can |
| 378 // be used later in "key-press-event" signal handler to determine if a Tab or | 383 // be used later in "key-press-event" signal handler to determine if a Tab or |
| 379 // Enter key event is handled by IME or not. | 384 // Enter key event is handled by IME or not. |
| 380 char char_inserted_; | 385 char char_inserted_; |
| 381 | 386 |
| 382 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk); | 387 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk); |
| 383 }; | 388 }; |
| 384 | 389 |
| 385 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ | 390 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ |
| OLD | NEW |