1 /* GTK - The GIMP Toolkit
2 * gtklinkbutton.h - an hyperlink-enabled button
4 * Copyright (C) 2005 Emmanuele Bassi <ebassi@gmail.com>
7 * Based on gnome-href code by:
8 * James Henstridge <james@daa.com.au>
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.
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.
20 * You should have received a copy of the GNU Library General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Cambridge, MA 02139, USA.
25 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
26 #error "Only <gtk/gtk.h> can be included directly."
29 #ifndef __GTK_LINK_BUTTON_H__
30 #define __GTK_LINK_BUTTON_H__
32 #include <gtk/gtkbutton.h>
36 #define GTK_TYPE_LINK_BUTTON (gtk_link_button_get_type ())
37 #define GTK_LINK_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_LINK_BUTTON, GtkLinkButton))
38 #define GTK_IS_LINK_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_LINK_BUTTON))
39 #define GTK_LINK_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_LINK_BUTTON, GtkLinkButtonClass))
40 #define GTK_IS_LINK_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LINK_BUTTON))
41 #define GTK_LINK_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_LINK_BUTTON, GtkLinkButtonClass))
43 typedef struct _GtkLinkButton GtkLinkButton;
44 typedef struct _GtkLinkButtonClass GtkLinkButtonClass;
45 typedef struct _GtkLinkButtonPrivate GtkLinkButtonPrivate;
50 * The <structname>GtkLinkButton</structname> structure contains only
51 * private data and should be accessed using the provided API.
56 GtkButton parent_instance;
58 GtkLinkButtonPrivate *priv;
63 * @activate_link: class handler for the #GtkLinkButton::activate-link signal
65 * The <structname>GtkLinkButtonClass</structname> structure contains only
68 struct _GtkLinkButtonClass
71 GtkButtonClass parent_class;
74 gboolean (* activate_link) (GtkLinkButton *button);
77 /* Padding for future expansion */
78 void (*_gtk_padding1) (void);
79 void (*_gtk_padding2) (void);
80 void (*_gtk_padding3) (void);
81 void (*_gtk_padding4) (void);
84 GType gtk_link_button_get_type (void) G_GNUC_CONST;
86 GtkWidget * gtk_link_button_new (const gchar *uri);
87 GtkWidget * gtk_link_button_new_with_label (const gchar *uri,
90 const gchar * gtk_link_button_get_uri (GtkLinkButton *link_button);
91 void gtk_link_button_set_uri (GtkLinkButton *link_button,
94 gboolean gtk_link_button_get_visited (GtkLinkButton *link_button);
95 void gtk_link_button_set_visited (GtkLinkButton *link_button,
101 #endif /* __GTK_LINK_BUTTON_H__ */