Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(340)

Side by Side Diff: gecko-sdk/include/nsIContextMenuListener.h

Issue 20346: Version 1.8 of gecko-sdk. Downloaded from here:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gecko-sdk/include/nsIComponentRegistrar.h ('k') | gecko-sdk/include/nsICookie.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 /*
2 * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/builds/tinderbox/XR-Mozilla1.8.0 -Release/WINNT_5.2_Depend/mozilla/embedding/browser/webBrowser/nsIContextMenuLis tener.idl
3 */
4
5 #ifndef __gen_nsIContextMenuListener_h__
6 #define __gen_nsIContextMenuListener_h__
7
8
9 #ifndef __gen_nsISupports_h__
10 #include "nsISupports.h"
11 #endif
12
13 /* For IDL files that don't want to include root IDL files. */
14 #ifndef NS_NO_VTABLE
15 #define NS_NO_VTABLE
16 #endif
17 class nsIDOMEvent; /* forward declaration */
18
19 class nsIDOMNode; /* forward declaration */
20
21
22 /* starting interface: nsIContextMenuListener */
23 #define NS_ICONTEXTMENULISTENER_IID_STR "3478b6b0-3875-11d4-94ef-0020183bf181"
24
25 #define NS_ICONTEXTMENULISTENER_IID \
26 {0x3478b6b0, 0x3875, 0x11d4, \
27 { 0x94, 0xef, 0x00, 0x20, 0x18, 0x3b, 0xf1, 0x81 }}
28
29 /**
30 * An optional interface for embedding clients wishing to receive
31 * notifications for context menu events (e.g. generated by
32 * a user right-mouse clicking on a link). The embedder implements
33 * this interface on the web browser chrome object associated
34 * with the window that notifications are required for. When a context
35 * menu event, the browser will call this interface if present.
36 *
37 * @see nsIDOMNode
38 * @see nsIDOMEvent
39 *
40 * @status FROZEN
41 */
42 class NS_NO_VTABLE nsIContextMenuListener : public nsISupports {
43 public:
44
45 NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICONTEXTMENULISTENER_IID)
46
47 /** Flag. No context. */
48 enum { CONTEXT_NONE = 0U };
49
50 /** Flag. Context is a link element. */
51 enum { CONTEXT_LINK = 1U };
52
53 /** Flag. Context is an image element. */
54 enum { CONTEXT_IMAGE = 2U };
55
56 /** Flag. Context is the whole document. */
57 enum { CONTEXT_DOCUMENT = 4U };
58
59 /** Flag. Context is a text area element. */
60 enum { CONTEXT_TEXT = 8U };
61
62 /** Flag. Context is an input element. */
63 enum { CONTEXT_INPUT = 16U };
64
65 /**
66 * Called when the browser receives a context menu event (e.g. user is right -mouse
67 * clicking somewhere on the document). The combination of flags, event and node
68 * provided in the call indicate where and what was clicked on.
69 *
70 * The following table describes what context flags and node combinations ar e
71 * possible.
72 *
73 * <TABLE>
74 * <TR><TD><B>aContextFlag</B></TD><TD>aNode</TD></TR>
75 * <TR><TD>CONTEXT_LINK</TD><TD>&lt;A&gt;</TD></TR>
76 * <TR><TD>CONTEXT_IMAGE</TD><TD>&lt;IMG&gt;</TD></TR>
77 * <TR><TD>CONTEXT_IMAGE | CONTEXT_LINK</TD><TD>&lt;IMG&gt;
78 * with an &lt;A&gt; as an ancestor</TD></TR>
79 * <TR><TD>CONTEXT_INPUT</TD><TD>&lt;INPUT&gt;</TD></TR>
80 * <TR><TD>CONTEXT_TEXT</TD><TD>&lt;TEXTAREA&gt;</TD></TR>
81 * <TR><TD>CONTEXT_DOCUMENT</TD><TD>&lt;HTML&gt;</TD></TR>
82 * </TABLE>
83 *
84 * @param aContextFlags Flags indicating the kind of context.
85 * @param aEvent The DOM context menu event.
86 * @param aNode The DOM node most relevant to the context.
87 *
88 * @return <CODE>NS_OK</CODE> always.
89 */
90 /* void onShowContextMenu (in unsigned long aContextFlags, in nsIDOMEvent aEve nt, in nsIDOMNode aNode); */
91 NS_IMETHOD OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent *aEvent, nsID OMNode *aNode) = 0;
92
93 };
94
95 /* Use this macro when declaring classes that implement this interface. */
96 #define NS_DECL_NSICONTEXTMENULISTENER \
97 NS_IMETHOD OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent *aEvent, nsID OMNode *aNode);
98
99 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object. */
100 #define NS_FORWARD_NSICONTEXTMENULISTENER(_to) \
101 NS_IMETHOD OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent *aEvent, nsID OMNode *aNode) { return _to OnShowContextMenu(aContextFlags, aEvent, aNode); }
102
103 /* Use this macro to declare functions that forward the behavior of this interfa ce to another object in a safe way. */
104 #define NS_FORWARD_SAFE_NSICONTEXTMENULISTENER(_to) \
105 NS_IMETHOD OnShowContextMenu(PRUint32 aContextFlags, nsIDOMEvent *aEvent, nsID OMNode *aNode) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnShowContextMenu(aC ontextFlags, aEvent, aNode); }
106
107 #if 0
108 /* Use the code below as a template for the implementation class for this interf ace. */
109
110 /* Header file */
111 class nsContextMenuListener : public nsIContextMenuListener
112 {
113 public:
114 NS_DECL_ISUPPORTS
115 NS_DECL_NSICONTEXTMENULISTENER
116
117 nsContextMenuListener();
118
119 private:
120 ~nsContextMenuListener();
121
122 protected:
123 /* additional members */
124 };
125
126 /* Implementation file */
127 NS_IMPL_ISUPPORTS1(nsContextMenuListener, nsIContextMenuListener)
128
129 nsContextMenuListener::nsContextMenuListener()
130 {
131 /* member initializers and constructor code */
132 }
133
134 nsContextMenuListener::~nsContextMenuListener()
135 {
136 /* destructor code */
137 }
138
139 /* void onShowContextMenu (in unsigned long aContextFlags, in nsIDOMEvent aEvent , in nsIDOMNode aNode); */
140 NS_IMETHODIMP nsContextMenuListener::OnShowContextMenu(PRUint32 aContextFlags, n sIDOMEvent *aEvent, nsIDOMNode *aNode)
141 {
142 return NS_ERROR_NOT_IMPLEMENTED;
143 }
144
145 /* End of implementation class template. */
146 #endif
147
148
149 #endif /* __gen_nsIContextMenuListener_h__ */
OLDNEW
« no previous file with comments | « gecko-sdk/include/nsIComponentRegistrar.h ('k') | gecko-sdk/include/nsICookie.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698