Initial import of ephy (rev# 7126) from svn
[ephy-soc.git] / src / .svn / text-base / ephy-link.h.svn-base
blob2c2998ff791104437963e0cec39eb84a7c37cb87
1 /*
2  *  Copyright © 2004 Christian Persch
3  *
4  *  This program is free software; you can redistribute it and/or modify
5  *  it under the terms of the GNU General Public License as published by
6  *  the Free Software Foundation; either version 2, or (at your option)
7  *  any later version.
8  *
9  *  This program is distributed in the hope that it will be useful,
10  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *  GNU General Public License for more details.
13  *
14  *  You should have received a copy of the GNU General Public License
15  *  along with this program; if not, write to the Free Software
16  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  *
18  *  $Id$
19  */
21 #ifndef EPHY_LINK_H
22 #define EPHY_LINK_H
24 #include <glib-object.h>
25 #include "ephy-tab.h"
26 #include "ephy-window.h"
28 G_BEGIN_DECLS
30 #define EPHY_TYPE_LINK                  (ephy_link_get_type ())
31 #define EPHY_LINK(o)                    (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_LINK, EphyLink))
32 #define EPHY_LINK_IFACE(k)              (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_LINK, EphyLinkIface))
33 #define EPHY_IS_LINK(o)                 (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_LINK))
34 #define EPHY_IS_LINK_IFACE(k)           (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_LINK))
35 #define EPHY_LINK_GET_IFACE(inst)       (G_TYPE_INSTANCE_GET_INTERFACE ((inst), EPHY_TYPE_LINK, EphyLinkIface))
37 typedef struct _EphyLink        EphyLink;
38 typedef struct _EphyLinkIface   EphyLinkIface;
40 typedef enum
42         EPHY_LINK_NEW_WINDOW    = 1 << 0,
43         EPHY_LINK_NEW_TAB       = 1 << 1,
44         EPHY_LINK_JUMP_TO       = 1 << 2,
45         EPHY_LINK_ALLOW_FIXUP   = 1 << 3
46 } EphyLinkFlags;
48 struct _EphyLinkIface
50         GTypeInterface base_iface;
52         /* Signals */
53         EphyTab * (* open_link) (EphyLink *link,
54                                  const char *address,
55                                  EphyTab *tab,
56                                  EphyLinkFlags flags);
59 GType    ephy_link_flags_get_type       (void);
61 GType    ephy_link_get_type             (void);
63 EphyTab *ephy_link_open                 (EphyLink *link,
64                                          const char *address,
65                                          EphyTab *tab,
66                                          EphyLinkFlags flags);
68 EphyLinkFlags ephy_link_flags_from_current_event (void);
70 G_END_DECLS
72 #endif /* EPHY_LINK_H */