Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: views/controls/textfield/gtk_views_entry.h

Issue 1155008: Adds the ability to display text in a textfield when the text is (Closed)
Patch Set: Updates Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | views/controls/textfield/gtk_views_entry.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef VIEWS_WIDGET_GTK_VIEWS_ENTRY_H_
6 #define VIEWS_WIDGET_GTK_VIEWS_ENTRY_H_
7
8 #include <gdk/gdk.h>
9 #include <gtk/gtkentry.h>
10
11 namespace views {
12 class NativeTextfieldGtk;
13 }
14
15 // GtkViewsEntry is a subclass of GtkEntry that can draw text when the text in
16 // the entry is empty. For example, this could show the text 'password' in a
17 // password field when the text is empty. GtkViewsEntry is used internally by
18 // NativeTextfieldGtk.
19
20 G_BEGIN_DECLS
21
22 #define GTK_TYPE_VIEWS_ENTRY (gtk_views_entry_get_type ())
23 #define GTK_VIEWS_ENTRY(obj) \
24 (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_VIEWS_ENTRY, GtkViewsEntry))
25 #define GTK_VIEWS_ENTRY_CLASS(klass) \
26 (G_TYPE_CHECK_CLASS_CAST((klass), GTK_TYPE_VIEWS_ENTRY, GtkViewsEntryClass))
27 #define GTK_IS_VIEWS_ENTRY(obj) \
28 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_VIEWS_ENTRY))
29 #define GTK_IS_VIEWS_ENTRY_CLASS(klass) \
30 (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VIEWS_ENTRY))
31 #define GTK_VIEWS_ENTRY_GET_CLASS(obj) \
32 (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_VIEWS_ENTRY, GtkViewsEntry))
33
34 typedef struct _GtkViewsEntry GtkViewsEntry;
35 typedef struct _GtkViewsEntryClass GtkViewsEntryClass;
36
37 struct _GtkViewsEntry {
38 GtkEntry entry;
39 views::NativeTextfieldGtk* host;
40 };
41
42 struct _GtkViewsEntryClass {
43 GtkEntryClass parent_class;
44 };
45
46 GtkWidget* gtk_views_entry_new(views::NativeTextfieldGtk* host);
47
48 GType gtk_views_entry_get_type();
49
50 G_END_DECLS
51
52 #endif // VIEWS_WIDGET_GTK_VIEWS_ENTRY_H
OLDNEW
« no previous file with comments | « no previous file | views/controls/textfield/gtk_views_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698