| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_GTK_GTK_SKINNY_BUTTON_H_ |
| 6 #define CHROME_BROWSER_GTK_GTK_SKINNY_BUTTON_H_ |
| 7 |
| 8 #include <gdk/gdk.h> |
| 9 #include <gtk/gtk.h> |
| 10 |
| 11 G_BEGIN_DECLS |
| 12 |
| 13 #define GTK_TYPE_SKINNY_BUTTON (gtk_skinny_button_get_type ()) |
| 14 #define GTK_SKINNY_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \ |
| 15 GTK_TYPE_SKINNY_BUTTON, \ |
| 16 GtkSkinnyButton)) |
| 17 #define GTK_SKINNY_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \ |
| 18 GTK_TYPE_SKINNY_BUTTON, \ |
| 19 GtkSkinnyButtonClass)) |
| 20 #define GTK_IS_SKINNY_BUTTON(obj) \ |
| 21 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SKINNY_BUTTON)) |
| 22 #define GTK_IS_SKINNY_BUTTON_CLASS(klass) \ |
| 23 (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SKINNY_BUTTON)) |
| 24 #define GTK_SKINNY_BUTTON_GET_CLASS(obj) \ |
| 25 (G_TYPE_INSTANCE_GET_CLASS ((obj), \ |
| 26 GTK_TYPE_SKINNY_BUTTON, \ |
| 27 GtkSkinnyButton)) |
| 28 |
| 29 typedef struct _GtkSkinnyButton GtkSkinnyButton; |
| 30 typedef struct _GtkSkinnyButtonClass GtkSkinnyButtonClass; |
| 31 |
| 32 struct _GtkSkinnyButton { |
| 33 GtkButton button; |
| 34 GdkEventButton* click_button_event; |
| 35 }; |
| 36 |
| 37 struct _GtkSkinnyButtonClass { |
| 38 GtkButtonClass parent_class; |
| 39 }; |
| 40 |
| 41 // Make a link button with display text |text|. |
| 42 GtkWidget* gtk_skinny_button_new_with_label(const char* text); |
| 43 |
| 44 // Call this from within a "clicked" handler to get the release event that |
| 45 // triggered the click. It will return NULL if the click was triggered by a |
| 46 // keyboard event. |
| 47 const GdkEventButton* gtk_skinny_button_get_event_for_click( |
| 48 GtkSkinnyButton* button); |
| 49 |
| 50 GType gtk_skinny_button_get_type(); |
| 51 |
| 52 G_END_DECLS |
| 53 |
| 54 #endif // CHROME_BROWSER_GTK_GTK_SKINNY_BUTTON_H_ |
| OLD | NEW |