| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_UI_GTK_GTK_CHROME_LINK_BUTTON_H_ | 10 #ifndef CHROME_BROWSER_UI_GTK_GTK_CHROME_LINK_BUTTON_H_ |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 GtkChromeLinkButton)) | 32 GtkChromeLinkButton)) |
| 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* normal_markup; | 40 gchar* normal_markup; |
| 41 gchar* pressed_markup; | 41 gchar* pressed_markup; |
| 42 gboolean is_normal; | 42 gchar* insensitive_markup; |
| 43 GtkStateType label_state; |
| 43 gchar normal_color[9]; | 44 gchar normal_color[9]; |
| 44 gchar* native_markup; | 45 gchar* native_markup; |
| 45 gboolean using_native_theme; | 46 gboolean using_native_theme; |
| 46 GdkCursor* hand_cursor; | 47 GdkCursor* hand_cursor; |
| 47 gchar* text; | 48 gchar* text; |
| 48 gboolean uses_markup; | 49 gboolean uses_markup; |
| 49 }; | 50 }; |
| 50 | 51 |
| 51 struct _GtkChromeLinkButtonClass { | 52 struct _GtkChromeLinkButtonClass { |
| 52 GtkButtonClass parent_class; | 53 GtkButtonClass parent_class; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 70 // Set the color when the link is in a normal state (i.e. not pressed). | 71 // Set the color when the link is in a normal state (i.e. not pressed). |
| 71 // If not set, or called NULL |color|, the color will be blue. | 72 // If not set, or called NULL |color|, the color will be blue. |
| 72 void gtk_chrome_link_button_set_normal_color(GtkChromeLinkButton* button, | 73 void gtk_chrome_link_button_set_normal_color(GtkChromeLinkButton* button, |
| 73 const GdkColor* color); | 74 const GdkColor* color); |
| 74 | 75 |
| 75 GType gtk_chrome_link_button_get_type(); | 76 GType gtk_chrome_link_button_get_type(); |
| 76 | 77 |
| 77 G_END_DECLS | 78 G_END_DECLS |
| 78 | 79 |
| 79 #endif // CHROME_BROWSER_UI_GTK_GTK_CHROME_LINK_BUTTON_H_ | 80 #endif // CHROME_BROWSER_UI_GTK_GTK_CHROME_LINK_BUTTON_H_ |
| OLD | NEW |