| OLD | NEW | 
|   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  Loading... | 
|  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; | 
|  43   GdkCursor* hand_cursor; |  45   GdkCursor* hand_cursor; | 
|  44   GdkEventButton* click_button_event; |  46   GdkEventButton* click_button_event; | 
 |  47   gchar* text; | 
 |  48   gboolean uses_markup; | 
|  45 }; |  49 }; | 
|  46  |  50  | 
|  47 struct _GtkChromeLinkButtonClass { |  51 struct _GtkChromeLinkButtonClass { | 
|  48   GtkButtonClass parent_class; |  52   GtkButtonClass parent_class; | 
|  49 }; |  53 }; | 
|  50  |  54  | 
|  51 // Make a link button with display text |text|. |  55 // Make a link button with display text |text|. | 
|  52 GtkWidget* gtk_chrome_link_button_new(const char* text); |  56 GtkWidget* gtk_chrome_link_button_new(const char* text); | 
|  53  |  57  | 
|  54 // As above, but don't escape markup in the text. |  58 // As above, but don't escape markup in the text. | 
|  55 GtkWidget* gtk_chrome_link_button_new_with_markup(const char* markup); |  59 GtkWidget* gtk_chrome_link_button_new_with_markup(const char* markup); | 
|  56  |  60  | 
 |  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  | 
|  57 // Call this from within a "clicked" handler to get the release event that |  66 // Call this from within a "clicked" handler to get the release event that | 
|  58 // triggered the click. It will return NULL if the click was triggered by a |  67 // triggered the click. It will return NULL if the click was triggered by a | 
|  59 // keyboard event. |  68 // keyboard event. | 
|  60 const GdkEventButton* gtk_chrome_link_button_get_event_for_click( |  69 const GdkEventButton* gtk_chrome_link_button_get_event_for_click( | 
|  61     GtkChromeLinkButton* button); |  70     GtkChromeLinkButton* button); | 
|  62  |  71  | 
|  63 GType gtk_chrome_link_button_get_type(); |  72 GType gtk_chrome_link_button_get_type(); | 
|  64  |  73  | 
|  65 G_END_DECLS |  74 G_END_DECLS | 
|  66  |  75  | 
|  67 #endif  // CHROME_BROWSER_GTK_GTK_CHROME_LINK_BUTTON_H_ |  76 #endif  // CHROME_BROWSER_GTK_GTK_CHROME_LINK_BUTTON_H_ | 
| OLD | NEW |