| 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 GtkTextIter* location, | 214 GtkTextIter* location, |
| 215 GtkTextMark* mark, | 215 GtkTextMark* mark, |
| 216 gpointer self) { | 216 gpointer self) { |
| 217 reinterpret_cast<AutocompleteEditViewGtk*>(self)-> | 217 reinterpret_cast<AutocompleteEditViewGtk*>(self)-> |
| 218 HandleMarkSet(buffer, location, mark); | 218 HandleMarkSet(buffer, location, mark); |
| 219 } | 219 } |
| 220 void HandleMarkSet(GtkTextBuffer* buffer, | 220 void HandleMarkSet(GtkTextBuffer* buffer, |
| 221 GtkTextIter* location, | 221 GtkTextIter* location, |
| 222 GtkTextMark* mark); | 222 GtkTextMark* mark); |
| 223 | 223 |
| 224 static void HandleDragDataReceivedThunk(GtkWidget* widget, |
| 225 GdkDragContext* context, |
| 226 gint x, gint y, |
| 227 GtkSelectionData* selection_data, |
| 228 guint target_type, |
| 229 guint time, |
| 230 gpointer self) { |
| 231 reinterpret_cast<AutocompleteEditViewGtk*>(self)-> |
| 232 HandleDragDataReceived(context, x, y, selection_data, target_type, |
| 233 time); |
| 234 } |
| 235 void HandleDragDataReceived(GdkDragContext* context, gint x, gint y, |
| 236 GtkSelectionData* selection_data, |
| 237 guint target_type, guint time); |
| 238 |
| 224 // Actual implementation of SelectAll(), but also provides control over | 239 // Actual implementation of SelectAll(), but also provides control over |
| 225 // whether the PRIMARY selection is set to the selected text (in SelectAll(), | 240 // whether the PRIMARY selection is set to the selected text (in SelectAll(), |
| 226 // it isn't, but we want set the selection when the user clicks in the entry). | 241 // it isn't, but we want set the selection when the user clicks in the entry). |
| 227 void SelectAllInternal(bool reversed, bool update_primary_selection); | 242 void SelectAllInternal(bool reversed, bool update_primary_selection); |
| 228 | 243 |
| 229 // Get ready to update |text_buffer_|'s highlighting without making changes to | 244 // Get ready to update |text_buffer_|'s highlighting without making changes to |
| 230 // the PRIMARY selection. Removes the clipboard from |text_buffer_| and | 245 // the PRIMARY selection. Removes the clipboard from |text_buffer_| and |
| 231 // blocks the "mark-set" signal handler. | 246 // blocks the "mark-set" signal handler. |
| 232 void StartUpdatingHighlightedText(); | 247 void StartUpdatingHighlightedText(); |
| 233 | 248 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 314 | 329 |
| 315 // Was the text view already focused before the user clicked in it? We use | 330 // Was the text view already focused before the user clicked in it? We use |
| 316 // this to figure out whether we should select all of the text when the button | 331 // this to figure out whether we should select all of the text when the button |
| 317 // is released (we only do so if the view was initially unfocused). | 332 // is released (we only do so if the view was initially unfocused). |
| 318 bool text_view_focused_before_button_press_; | 333 bool text_view_focused_before_button_press_; |
| 319 | 334 |
| 320 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk); | 335 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditViewGtk); |
| 321 }; | 336 }; |
| 322 | 337 |
| 323 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ | 338 #endif // CHROME_BROWSER_AUTOCOMPLETE_AUTOCOMPLETE_EDIT_VIEW_GTK_H_ |
| OLD | NEW |