1 /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3  *  Copyright © 2004 Christian Persch
4  *
5  *  This file is part of Epiphany.
6  *
7  *  Epiphany is free software: you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation, either version 3 of the License, or
10  *  (at your option) any later version.
11  *
12  *  Epiphany is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with Epiphany.  If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #pragma once
22 
23 #include <glib-object.h>
24 
25 #include "ephy-embed.h"
26 #include "ephy-window.h"
27 
28 G_BEGIN_DECLS
29 
30 #define EPHY_TYPE_LINK (ephy_link_get_type ())
31 
32 G_DECLARE_INTERFACE (EphyLink, ephy_link, EPHY, LINK, GObject)
33 
34 typedef enum
35 {
36   EPHY_LINK_NEW_WINDOW             = 1 << 0,
37   EPHY_LINK_NEW_TAB                = 1 << 1,
38   EPHY_LINK_JUMP_TO                = 1 << 2,
39   EPHY_LINK_NEW_TAB_APPEND_AFTER   = 1 << 3,
40   EPHY_LINK_HOME_PAGE              = 1 << 4,
41   EPHY_LINK_TYPED                  = 1 << 5,
42   EPHY_LINK_BOOKMARK               = 1 << 6
43 } EphyLinkFlags;
44 
45 struct _EphyLinkInterface
46 {
47   GTypeInterface base_iface;
48 
49   /* Signals */
50   EphyEmbed * (* open_link) (EphyLink *link,
51                              const char *address,
52                              EphyEmbed *embed,
53                              EphyLinkFlags flags);
54 };
55 
56 EphyEmbed *ephy_link_open (EphyLink *link,
57                            const char *address,
58                            EphyEmbed *embed,
59                            EphyLinkFlags flags);
60 
61 EphyLinkFlags ephy_link_flags_from_current_event (void);
62 
63 G_END_DECLS
64