Index: views/controls/textfield/gtk_views_entry.h |
diff --git a/views/controls/textfield/gtk_views_entry.h b/views/controls/textfield/gtk_views_entry.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e5b370d3bb5b054c18e408c423612738e0af83f1 |
--- /dev/null |
+++ b/views/controls/textfield/gtk_views_entry.h |
@@ -0,0 +1,52 @@ |
+// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef VIEWS_WIDGET_GTK_VIEWS_ENTRY_H_ |
+#define VIEWS_WIDGET_GTK_VIEWS_ENTRY_H_ |
+ |
+#include <gdk/gdk.h> |
+#include <gtk/gtkentry.h> |
+ |
+namespace views { |
+class NativeTextfieldGtk; |
+} |
+ |
+// GtkViewsEntry is a subclass of GtkEntry that can draw text when the text in |
+// the entry is empty. For example, this could show the text 'password' in a |
+// password field when the text is empty. GtkViewsEntry is used internally by |
+// NativeTextfieldGtk. |
+ |
+G_BEGIN_DECLS |
+ |
+#define GTK_TYPE_VIEWS_ENTRY (gtk_views_entry_get_type ()) |
+#define GTK_VIEWS_ENTRY(obj) \ |
+ (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_VIEWS_ENTRY, GtkViewsEntry)) |
+#define GTK_VIEWS_ENTRY_CLASS(klass) \ |
+ (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_VIEWS_ENTRY, GtkViewsEntryClass)) |
+#define GTK_IS_VIEWS_ENTRY(obj) \ |
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_VIEWS_ENTRY)) |
+#define GTK_IS_VIEWS_ENTRY_CLASS(klass) \ |
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VIEWS_ENTRY)) |
+#define GTK_VIEWS_ENTRY_GET_CLASS(obj) \ |
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_VIEWS_ENTRY, GtkViewsEntry)) |
+ |
+typedef struct _GtkViewsEntry GtkViewsEntry; |
+typedef struct _GtkViewsEntryClass GtkViewsEntryClass; |
+ |
+struct _GtkViewsEntry { |
+ GtkEntry entry; |
+ views::NativeTextfieldGtk* host; |
+}; |
+ |
+struct _GtkViewsEntryClass { |
+ GtkEntryClass parent_class; |
+}; |
+ |
+GtkWidget* gtk_views_entry_new(views::NativeTextfieldGtk* host); |
+ |
+GType gtk_views_entry_get_type(); |
+ |
+G_END_DECLS |
+ |
+#endif // VIEWS_WIDGET_GTK_VIEWS_ENTRY_H |