1/* GTK - The GIMP Toolkit
2 * gtklinkbutton.h - an hyperlink-enabled button
3 *
4 * Copyright (C) 2005 Emmanuele Bassi <[email protected]>
5 * All rights reserved.
6 *
7 * Based on gnome-href code by:
8 * James Henstridge <[email protected]>
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Library General Public
12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Library General Public License for more details.
19 *
20 * You should have received a copy of the GNU Library General Public
21 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
22 */
23
24#ifndef __GTK_LINK_BUTTON_H__
25#define __GTK_LINK_BUTTON_H__
26
27#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
28#error "Only <gtk/gtk.h> can be included directly."
29#endif
30
31#include <gtk/gtkbutton.h>
32
33G_BEGIN_DECLS
34
35#define GTK_TYPE_LINK_BUTTON (gtk_link_button_get_type ())
36#define GTK_LINK_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_LINK_BUTTON, GtkLinkButton))
37#define GTK_IS_LINK_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_LINK_BUTTON))
38#define GTK_LINK_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_LINK_BUTTON, GtkLinkButtonClass))
39#define GTK_IS_LINK_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LINK_BUTTON))
40#define GTK_LINK_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_LINK_BUTTON, GtkLinkButtonClass))
41
42typedef struct _GtkLinkButton GtkLinkButton;
43typedef struct _GtkLinkButtonClass GtkLinkButtonClass;
44typedef struct _GtkLinkButtonPrivate GtkLinkButtonPrivate;
45
46/**
47 * GtkLinkButton:
48 *
49 * The #GtkLinkButton-struct contains only
50 * private data and should be accessed using the provided API.
51 */
52struct _GtkLinkButton
53{
54 /*< private >*/
55 GtkButton parent_instance;
56
57 GtkLinkButtonPrivate *priv;
58};
59
60/**
61 * GtkLinkButtonClass:
62 * @activate_link: class handler for the #GtkLinkButton::activate-link signal
63 *
64 * The #GtkLinkButtonClass contains only
65 * private data.
66 */
67struct _GtkLinkButtonClass
68{
69 /*< private >*/
70 GtkButtonClass parent_class;
71
72 /*< public >*/
73 gboolean (* activate_link) (GtkLinkButton *button);
74
75 /*< private >*/
76 /* Padding for future expansion */
77 void (*_gtk_padding1) (void);
78 void (*_gtk_padding2) (void);
79 void (*_gtk_padding3) (void);
80 void (*_gtk_padding4) (void);
81};
82
83GDK_AVAILABLE_IN_ALL
84GType gtk_link_button_get_type (void) G_GNUC_CONST;
85
86GDK_AVAILABLE_IN_ALL
87GtkWidget * gtk_link_button_new (const gchar *uri);
88GDK_AVAILABLE_IN_ALL
89GtkWidget * gtk_link_button_new_with_label (const gchar *uri,
90 const gchar *label);
91
92GDK_AVAILABLE_IN_ALL
93const gchar * gtk_link_button_get_uri (GtkLinkButton *link_button);
94GDK_AVAILABLE_IN_ALL
95void gtk_link_button_set_uri (GtkLinkButton *link_button,
96 const gchar *uri);
97
98GDK_AVAILABLE_IN_ALL
99gboolean gtk_link_button_get_visited (GtkLinkButton *link_button);
100GDK_AVAILABLE_IN_ALL
101void gtk_link_button_set_visited (GtkLinkButton *link_button,
102 gboolean visited);
103
104
105G_END_DECLS
106
107#endif /* __GTK_LINK_BUTTON_H__ */
108