Bug 634366 - Remove broken CreateForNativePixmapSurface usage from CairoImageOGL...
[mozilla-central.git] / webshell / public / nsILinkHandler.h
blob4b62d4ccc6ddbbe75264a47139a591b36c4b1335
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is Mozilla Communicator client code.
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1998
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
24 * Alternatively, the contents of this file may be used under the terms of
25 * either of the GNU General Public License Version 2 or later (the "GPL"),
26 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
37 #ifndef nsILinkHandler_h___
38 #define nsILinkHandler_h___
40 #include "nsISupports.h"
41 #include "nsIContent.h"
43 class nsIInputStream;
44 class nsIDocShell;
45 class nsIRequest;
46 class nsString;
47 class nsGUIEvent;
49 // Interface ID for nsILinkHandler
50 #define NS_ILINKHANDLER_IID \
51 { 0x71627c30, 0xd3c5, 0x4ad0,{0xb5, 0x33, 0x6e, 0x01, 0x91, 0xf2, 0x79, 0x32}}
53 /**
54 * Interface used for handling clicks on links
56 class nsILinkHandler : public nsISupports {
57 public:
58 NS_DECLARE_STATIC_IID_ACCESSOR(NS_ILINKHANDLER_IID)
60 /**
61 * Process a click on a link.
63 * @param aContent the content for the frame that generated the trigger
64 * @param aURI a URI object that defines the destination for the link
65 * @param aTargetSpec indicates where the link is targeted (may be an empty
66 * string)
67 * @param aPostDataStream the POST data to send
68 * @param aHeadersDataStream ???
70 NS_IMETHOD OnLinkClick(nsIContent* aContent,
71 nsIURI* aURI,
72 const PRUnichar* aTargetSpec,
73 nsIInputStream* aPostDataStream = 0,
74 nsIInputStream* aHeadersDataStream = 0) = 0;
76 /**
77 * Process a click on a link.
79 * Works the same as OnLinkClick() except it happens immediately rather than
80 * through an event.
82 * @param aContent the content for the frame that generated the trigger
83 * @param aURI a URI obect that defines the destination for the link
84 * @param aTargetSpec indicates where the link is targeted (may be an empty
85 * string)
86 * @param aPostDataStream the POST data to send
87 * @param aHeadersDataStream ???
88 * @param aDocShell (out-param) the DocShell that the request was opened on
89 * @param aRequest the request that was opened
91 NS_IMETHOD OnLinkClickSync(nsIContent* aContent,
92 nsIURI* aURI,
93 const PRUnichar* aTargetSpec,
94 nsIInputStream* aPostDataStream = 0,
95 nsIInputStream* aHeadersDataStream = 0,
96 nsIDocShell** aDocShell = 0,
97 nsIRequest** aRequest = 0) = 0;
99 /**
100 * Process a mouse-over a link.
102 * @param aContent the linked content.
103 * @param aURI an URI object that defines the destination for the link
104 * @param aTargetSpec indicates where the link is targeted (it may be an empty
105 * string)
107 NS_IMETHOD OnOverLink(nsIContent* aContent,
108 nsIURI* aURLSpec,
109 const PRUnichar* aTargetSpec) = 0;
112 * Process the mouse leaving a link.
114 NS_IMETHOD OnLeaveLink() = 0;
117 NS_DEFINE_STATIC_IID_ACCESSOR(nsILinkHandler, NS_ILINKHANDLER_IID)
119 #endif /* nsILinkHandler_h___ */