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

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

Issue 3064027: gtk: Fix presubmit errors. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: Created 10 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
« no previous file with comments | « chrome/browser/gtk/gtk_chrome_button.h ('k') | no next file » | 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) 2010 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_
11 #define CHROME_BROWSER_GTK_GTK_CHROME_LINK_BUTTON_H_ 11 #define CHROME_BROWSER_GTK_GTK_CHROME_LINK_BUTTON_H_
12 #pragma once 12 #pragma once
13 13
14 #include <gdk/gdk.h> 14 #include <gdk/gdk.h>
15 #include <gtk/gtk.h> 15 #include <gtk/gtk.h>
16 16
17 G_BEGIN_DECLS 17 G_BEGIN_DECLS
18 18
19 #define GTK_TYPE_CHROME_LINK_BUTTON (gtk_chrome_link_button_get_type ()) 19 #define GTK_TYPE_CHROME_LINK_BUTTON (gtk_chrome_link_button_get_type ())
20 #define GTK_CHROME_LINK_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \ 20 #define GTK_CHROME_LINK_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
21 GTK_TYPE_CHROME_LINK_BUTTON, \ 21 GTK_TYPE_CHROME_LINK_BUTTON, \
22 GtkChromeLinkButton)) 22 GtkChromeLinkButton))
23 #define GTK_CHROME_LINK_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \ 23 #define GTK_CHROME_LINK_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
24 GTK_TYPE_CHROME_LINK_BUTTON, \ 24 GTK_TYPE_CHROME_LINK_BUTTON, \
25 GtkChromeLinkButtonClass)) 25 GtkChromeLinkButtonClass))
26 #define GTK_IS_CHROME_LINK_BUTTON(obj) \ 26 #define GTK_IS_CHROME_LINK_BUTTON(obj) \
27 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CHROME_LINK_BUTTON)) 27 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTK_TYPE_CHROME_LINK_BUTTON))
28 #define GTK_IS_CHROME_LINK_BUTTON_CLASS(klass) \ 28 #define GTK_IS_CHROME_LINK_BUTTON_CLASS(klass) \
29 (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CHROME_LINK_BUTTON)) 29 (G_TYPE_CHECK_CLASS_TYPE((klass), GTK_TYPE_CHROME_LINK_BUTTON))
30 #define GTK_CHROME_LINK_BUTTON_GET_CLASS(obj) \ 30 #define GTK_CHROME_LINK_BUTTON_GET_CLASS(obj) \
31 (G_TYPE_INSTANCE_GET_CLASS ((obj), \ 31 (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_CHROME_LINK_BUTTON, \
32 GTK_TYPE_CHROME_LINK_BUTTON, \ 32 GtkChromeLinkButton))
33 GtkChromeLinkButton))
34 33
35 typedef struct _GtkChromeLinkButton GtkChromeLinkButton; 34 typedef struct _GtkChromeLinkButton GtkChromeLinkButton;
36 typedef struct _GtkChromeLinkButtonClass GtkChromeLinkButtonClass; 35 typedef struct _GtkChromeLinkButtonClass GtkChromeLinkButtonClass;
37 36
38 struct _GtkChromeLinkButton { 37 struct _GtkChromeLinkButton {
39 GtkButton button; 38 GtkButton button;
40 GtkWidget* label; 39 GtkWidget* label;
41 gchar* normal_markup; 40 gchar* normal_markup;
42 gchar* pressed_markup; 41 gchar* pressed_markup;
43 gboolean is_normal; 42 gboolean is_normal;
(...skipping 27 matching lines...) Expand all
71 // Set the color when the link is in a normal state (i.e. not pressed). 70 // Set the color when the link is in a normal state (i.e. not pressed).
72 // If not set, or called NULL |color|, the color will be blue. 71 // If not set, or called NULL |color|, the color will be blue.
73 void gtk_chrome_link_button_set_normal_color(GtkChromeLinkButton* button, 72 void gtk_chrome_link_button_set_normal_color(GtkChromeLinkButton* button,
74 const GdkColor* color); 73 const GdkColor* color);
75 74
76 GType gtk_chrome_link_button_get_type(); 75 GType gtk_chrome_link_button_get_type();
77 76
78 G_END_DECLS 77 G_END_DECLS
79 78
80 #endif // CHROME_BROWSER_GTK_GTK_CHROME_LINK_BUTTON_H_ 79 #endif // CHROME_BROWSER_GTK_GTK_CHROME_LINK_BUTTON_H_
OLDNEW
« no previous file with comments | « chrome/browser/gtk/gtk_chrome_button.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698