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

Side by Side Diff: chrome/browser/gtk/gtk_chrome_link_button.h

Issue 160491: revert 22226 as it caused some ui test crashes (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/gtk/download_shelf_gtk.cc ('k') | chrome/browser/gtk/gtk_chrome_link_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Creates a link button that shows |text| in blue and underlined. The cursor 5 // Creates a link button that shows |text| in blue and underlined. The cursor
6 // changes to a hand when over the link. This is like the GTK LinkButton, but 6 // changes to a hand when over the link. This is like the GTK LinkButton, but
7 // it doesn't call the global URI link handler, etc. It is a button subclass, 7 // it doesn't call the global URI link handler, etc. It is a button subclass,
8 // so you can just handle the clicked signal. 8 // so you can just handle the clicked signal.
9 9
10 #ifndef CHROME_BROWSER_GTK_GTK_CHROME_LINK_BUTTON_H_ 10 #ifndef CHROME_BROWSER_GTK_GTK_CHROME_LINK_BUTTON_H_
(...skipping 22 matching lines...) Expand all
33 33
34 typedef struct _GtkChromeLinkButton GtkChromeLinkButton; 34 typedef struct _GtkChromeLinkButton GtkChromeLinkButton;
35 typedef struct _GtkChromeLinkButtonClass GtkChromeLinkButtonClass; 35 typedef struct _GtkChromeLinkButtonClass GtkChromeLinkButtonClass;
36 36
37 struct _GtkChromeLinkButton { 37 struct _GtkChromeLinkButton {
38 GtkButton button; 38 GtkButton button;
39 GtkWidget* label; 39 GtkWidget* label;
40 gchar* blue_markup; 40 gchar* blue_markup;
41 gchar* red_markup; 41 gchar* red_markup;
42 gboolean is_blue; 42 gboolean is_blue;
43 gchar* native_markup;
44 gboolean using_native_theme;
45 GdkCursor* hand_cursor; 43 GdkCursor* hand_cursor;
46 GdkEventButton* click_button_event; 44 GdkEventButton* click_button_event;
47 gchar* text;
48 gboolean uses_markup;
49 }; 45 };
50 46
51 struct _GtkChromeLinkButtonClass { 47 struct _GtkChromeLinkButtonClass {
52 GtkButtonClass parent_class; 48 GtkButtonClass parent_class;
53 }; 49 };
54 50
55 // Make a link button with display text |text|. 51 // Make a link button with display text |text|.
56 GtkWidget* gtk_chrome_link_button_new(const char* text); 52 GtkWidget* gtk_chrome_link_button_new(const char* text);
57 53
58 // As above, but don't escape markup in the text. 54 // As above, but don't escape markup in the text.
59 GtkWidget* gtk_chrome_link_button_new_with_markup(const char* markup); 55 GtkWidget* gtk_chrome_link_button_new_with_markup(const char* markup);
60 56
61 // Set whether the link button draws natively (using "link-color"). The default
62 // is TRUE.
63 void gtk_chrome_link_button_set_use_gtk_theme(GtkChromeLinkButton* button,
64 gboolean use_gtk);
65
66 // Call this from within a "clicked" handler to get the release event that 57 // Call this from within a "clicked" handler to get the release event that
67 // triggered the click. It will return NULL if the click was triggered by a 58 // triggered the click. It will return NULL if the click was triggered by a
68 // keyboard event. 59 // keyboard event.
69 const GdkEventButton* gtk_chrome_link_button_get_event_for_click( 60 const GdkEventButton* gtk_chrome_link_button_get_event_for_click(
70 GtkChromeLinkButton* button); 61 GtkChromeLinkButton* button);
71 62
72 GType gtk_chrome_link_button_get_type(); 63 GType gtk_chrome_link_button_get_type();
73 64
74 G_END_DECLS 65 G_END_DECLS
75 66
76 #endif // CHROME_BROWSER_GTK_GTK_CHROME_LINK_BUTTON_H_ 67 #endif // CHROME_BROWSER_GTK_GTK_CHROME_LINK_BUTTON_H_
OLDNEW
« no previous file with comments | « chrome/browser/gtk/download_shelf_gtk.cc ('k') | chrome/browser/gtk/gtk_chrome_link_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698