OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "views/controls/textfield/gtk_views_textview.h" | 5 #include "views/controls/textfield/gtk_views_textview.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "gfx/canvas_skia_paint.h" | 8 #include "ui/gfx/canvas_skia_paint.h" |
9 #include "gfx/insets.h" | 9 #include "ui/gfx/insets.h" |
10 #include "gfx/skia_utils_gtk.h" | 10 #include "ui/gfx/skia_utils_gtk.h" |
11 #include "views/controls/textfield/native_textfield_gtk.h" | 11 #include "views/controls/textfield/native_textfield_gtk.h" |
12 #include "views/controls/textfield/textfield.h" | 12 #include "views/controls/textfield/textfield.h" |
13 | 13 |
14 G_BEGIN_DECLS | 14 G_BEGIN_DECLS |
15 | 15 |
16 G_DEFINE_TYPE(GtkViewsTextView, gtk_views_textview, GTK_TYPE_TEXT_VIEW) | 16 G_DEFINE_TYPE(GtkViewsTextView, gtk_views_textview, GTK_TYPE_TEXT_VIEW) |
17 | 17 |
18 static gint gtk_views_textview_expose_event(GtkWidget *widget, | 18 static gint gtk_views_textview_expose_event(GtkWidget *widget, |
19 GdkEventExpose *event) { | 19 GdkEventExpose *event) { |
20 GtkTextView* text_view = GTK_TEXT_VIEW(widget); | 20 GtkTextView* text_view = GTK_TEXT_VIEW(widget); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 text_view->host = NULL; | 92 text_view->host = NULL; |
93 } | 93 } |
94 | 94 |
95 GtkWidget* gtk_views_textview_new(views::NativeTextfieldGtk* host) { | 95 GtkWidget* gtk_views_textview_new(views::NativeTextfieldGtk* host) { |
96 gpointer text_view = g_object_new(GTK_TYPE_VIEWS_TEXTVIEW, NULL); | 96 gpointer text_view = g_object_new(GTK_TYPE_VIEWS_TEXTVIEW, NULL); |
97 GTK_VIEWS_TEXTVIEW(text_view)->host = host; | 97 GTK_VIEWS_TEXTVIEW(text_view)->host = host; |
98 return GTK_WIDGET(text_view); | 98 return GTK_WIDGET(text_view); |
99 } | 99 } |
100 | 100 |
101 G_END_DECLS | 101 G_END_DECLS |
OLD | NEW |