PageRenderTime 185ms CodeModel.GetById 121ms app.highlight 8ms RepoModel.GetById 52ms app.codeStats 1ms

/gecko_api/include/nsIDOMWindowUtils.h

http://firefox-mac-pdf.googlecode.com/
C++ Header | 296 lines | 121 code | 43 blank | 132 comment | 0 complexity | 23f8ed7ec35c8a9e2ad2178d39ffb27f MD5 | raw file
  1/*
  2 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/dom/public/idl/base/nsIDOMWindowUtils.idl
  3 */
  4
  5#ifndef __gen_nsIDOMWindowUtils_h__
  6#define __gen_nsIDOMWindowUtils_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
 17class nsIDOMElement; /* forward declaration */
 18
 19
 20/* starting interface:    nsIDOMWindowUtils */
 21#define NS_IDOMWINDOWUTILS_IID_STR "1cfc1a0a-e348-4b18-b61b-935c192f85c4"
 22
 23#define NS_IDOMWINDOWUTILS_IID \
 24  {0x1cfc1a0a, 0xe348, 0x4b18, \
 25    { 0xb6, 0x1b, 0x93, 0x5c, 0x19, 0x2f, 0x85, 0xc4 }}
 26
 27class NS_NO_VTABLE NS_SCRIPTABLE nsIDOMWindowUtils : public nsISupports {
 28 public: 
 29
 30  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOMWINDOWUTILS_IID)
 31
 32  /**
 33   * Image animation mode of the window. When this attribute's value
 34   * is changed, the implementation should set all images in the window
 35   * to the given value. That is, when set to kDontAnimMode, all images
 36   * will stop animating. The attribute's value must be one of the
 37   * animationMode values from imgIContainer.
 38   * @note Images may individually override the window's setting after
 39   *       the window's mode is set. Therefore images given different modes
 40   *       since the last setting of the window's mode may behave
 41   *       out of line with the window's overall mode.
 42   * @note The attribute's value is the window's overall mode. It may
 43   *       for example continue to report kDontAnimMode after all images
 44   *       have subsequently been individually animated.
 45   * @note Only images immediately in this window are affected;
 46   *       this is not recursive to subwindows.
 47   * @see imgIContainer
 48   */
 49  /* attribute unsigned short imageAnimationMode; */
 50  NS_SCRIPTABLE NS_IMETHOD GetImageAnimationMode(PRUint16 *aImageAnimationMode) = 0;
 51  NS_SCRIPTABLE NS_IMETHOD SetImageAnimationMode(PRUint16 aImageAnimationMode) = 0;
 52
 53  /**
 54   * Whether the charset of the window's current document has been forced by
 55   * the user.
 56   * Cannot be accessed from unprivileged context (not content-accessible)
 57   */
 58  /* readonly attribute boolean docCharsetIsForced; */
 59  NS_SCRIPTABLE NS_IMETHOD GetDocCharsetIsForced(PRBool *aDocCharsetIsForced) = 0;
 60
 61  /**
 62   * Function to get metadata associated with the window's current document
 63   * @param aName the name of the metadata.  This should be all lowercase.
 64   * @return the value of the metadata, or the empty string if it's not set
 65   *
 66   * Will throw a DOM security error if called without UniversalXPConnect
 67   * privileges.
 68   */
 69  /* AString getDocumentMetadata (in AString aName); */
 70  NS_SCRIPTABLE NS_IMETHOD GetDocumentMetadata(const nsAString & aName, nsAString & _retval) = 0;
 71
 72  /**
 73   * Force an immediate redraw of this window.
 74   */
 75  /* void redraw (); */
 76  NS_SCRIPTABLE NS_IMETHOD Redraw(void) = 0;
 77
 78  /** Synthesize a mouse event for a window. The event types supported
 79   *  are: 
 80   *    mousedown, mouseup, mousemove, mouseover, mouseout, contextmenu
 81   *
 82   * Events are sent in coordinates offset by aX and aY from the window.
 83   *
 84   * Note that additional events may be fired as a result of this call. For
 85   * instance, typically a click event will be fired as a result of a
 86   * mousedown and mouseup in sequence.
 87   *
 88   * Normally at this level of events, the mouseover and mouseout events are
 89   * only fired when the window is entered or exited. For inter-element
 90   * mouseover and mouseout events, a movemove event fired on the new element
 91   * should be sufficient to generate the correct over and out events as well.
 92   *
 93   * Cannot be accessed from unprivileged context (not content-accessible)
 94   * Will throw a DOM security error if called without UniversalXPConnect
 95   * privileges.
 96   *
 97   * @param aType event type
 98   * @param aX x offset
 99   * @param aY y offset
100   * @param aButton button to synthesize
101   * @param aClickCount number of clicks that have been performed
102   * @param aModifiers modifiers pressed, using constants defined in nsIDOMNSEvent
103   */
104  /* void sendMouseEvent (in AString aType, in long aX, in long aY, in long aButton, in long aClickCount, in long aModifiers); */
105  NS_SCRIPTABLE NS_IMETHOD SendMouseEvent(const nsAString & aType, PRInt32 aX, PRInt32 aY, PRInt32 aButton, PRInt32 aClickCount, PRInt32 aModifiers) = 0;
106
107  /**
108   * Synthesize a key event to the window. The event types supported are:
109   *   keydown, keyup, keypress
110   *
111   * Key events generally end up being sent to the focused node.
112   *
113   * Cannot be accessed from unprivileged context (not content-accessible)
114   * Will throw a DOM security error if called without UniversalXPConnect
115   * privileges.
116   *
117   * @param aType event type
118   * @param aKeyCode key code
119   * @param aCharCode character code
120   * @param aModifiers modifiers pressed, using constants defined in nsIDOMNSEvent
121   */
122  /* void sendKeyEvent (in AString aType, in long aKeyCode, in long aCharCode, in long aModifiers); */
123  NS_SCRIPTABLE NS_IMETHOD SendKeyEvent(const nsAString & aType, PRInt32 aKeyCode, PRInt32 aCharCode, PRInt32 aModifiers) = 0;
124
125  /**
126   * See nsIWidget::SynthesizeNativeKeyEvent
127   *
128   * Cannot be accessed from unprivileged context (not content-accessible)
129   * Will throw a DOM security error if called without UniversalXPConnect
130   * privileges.
131   */
132  /* void sendNativeKeyEvent (in long aNativeKeyboardLayout, in long aNativeKeyCode, in long aModifierFlags, in AString aCharacters, in AString aUnmodifiedCharacters); */
133  NS_SCRIPTABLE NS_IMETHOD SendNativeKeyEvent(PRInt32 aNativeKeyboardLayout, PRInt32 aNativeKeyCode, PRInt32 aModifierFlags, const nsAString & aCharacters, const nsAString & aUnmodifiedCharacters) = 0;
134
135  /**
136   * Focus the element aElement. The element should be in the same document
137   * that the window is displaying. Pass null to blur the element, if any,
138   * that currently has focus, and focus the document.
139   *
140   * Cannot be accessed from unprivileged context (not content-accessible)
141   * Will throw a DOM security error if called without UniversalXPConnect
142   * privileges.
143   *
144   * @param aElement the element to focus
145   */
146  /* void focus (in nsIDOMElement aElement); */
147  NS_SCRIPTABLE NS_IMETHOD Focus(nsIDOMElement *aElement) = 0;
148
149  /**
150   * Force a garbage collection. This will run the cycle-collector twice to
151   * make sure all garbage is collected.
152   *
153   * Will throw a DOM security error if called without UniversalXPConnect
154   * privileges in non-debug builds. Available to all callers in debug builds.
155   */
156  /* void garbageCollect (); */
157  NS_SCRIPTABLE NS_IMETHOD GarbageCollect(void) = 0;
158
159};
160
161  NS_DEFINE_STATIC_IID_ACCESSOR(nsIDOMWindowUtils, NS_IDOMWINDOWUTILS_IID)
162
163/* Use this macro when declaring classes that implement this interface. */
164#define NS_DECL_NSIDOMWINDOWUTILS \
165  NS_SCRIPTABLE NS_IMETHOD GetImageAnimationMode(PRUint16 *aImageAnimationMode); \
166  NS_SCRIPTABLE NS_IMETHOD SetImageAnimationMode(PRUint16 aImageAnimationMode); \
167  NS_SCRIPTABLE NS_IMETHOD GetDocCharsetIsForced(PRBool *aDocCharsetIsForced); \
168  NS_SCRIPTABLE NS_IMETHOD GetDocumentMetadata(const nsAString & aName, nsAString & _retval); \
169  NS_SCRIPTABLE NS_IMETHOD Redraw(void); \
170  NS_SCRIPTABLE NS_IMETHOD SendMouseEvent(const nsAString & aType, PRInt32 aX, PRInt32 aY, PRInt32 aButton, PRInt32 aClickCount, PRInt32 aModifiers); \
171  NS_SCRIPTABLE NS_IMETHOD SendKeyEvent(const nsAString & aType, PRInt32 aKeyCode, PRInt32 aCharCode, PRInt32 aModifiers); \
172  NS_SCRIPTABLE NS_IMETHOD SendNativeKeyEvent(PRInt32 aNativeKeyboardLayout, PRInt32 aNativeKeyCode, PRInt32 aModifierFlags, const nsAString & aCharacters, const nsAString & aUnmodifiedCharacters); \
173  NS_SCRIPTABLE NS_IMETHOD Focus(nsIDOMElement *aElement); \
174  NS_SCRIPTABLE NS_IMETHOD GarbageCollect(void); 
175
176/* Use this macro to declare functions that forward the behavior of this interface to another object. */
177#define NS_FORWARD_NSIDOMWINDOWUTILS(_to) \
178  NS_SCRIPTABLE NS_IMETHOD GetImageAnimationMode(PRUint16 *aImageAnimationMode) { return _to GetImageAnimationMode(aImageAnimationMode); } \
179  NS_SCRIPTABLE NS_IMETHOD SetImageAnimationMode(PRUint16 aImageAnimationMode) { return _to SetImageAnimationMode(aImageAnimationMode); } \
180  NS_SCRIPTABLE NS_IMETHOD GetDocCharsetIsForced(PRBool *aDocCharsetIsForced) { return _to GetDocCharsetIsForced(aDocCharsetIsForced); } \
181  NS_SCRIPTABLE NS_IMETHOD GetDocumentMetadata(const nsAString & aName, nsAString & _retval) { return _to GetDocumentMetadata(aName, _retval); } \
182  NS_SCRIPTABLE NS_IMETHOD Redraw(void) { return _to Redraw(); } \
183  NS_SCRIPTABLE NS_IMETHOD SendMouseEvent(const nsAString & aType, PRInt32 aX, PRInt32 aY, PRInt32 aButton, PRInt32 aClickCount, PRInt32 aModifiers) { return _to SendMouseEvent(aType, aX, aY, aButton, aClickCount, aModifiers); } \
184  NS_SCRIPTABLE NS_IMETHOD SendKeyEvent(const nsAString & aType, PRInt32 aKeyCode, PRInt32 aCharCode, PRInt32 aModifiers) { return _to SendKeyEvent(aType, aKeyCode, aCharCode, aModifiers); } \
185  NS_SCRIPTABLE NS_IMETHOD SendNativeKeyEvent(PRInt32 aNativeKeyboardLayout, PRInt32 aNativeKeyCode, PRInt32 aModifierFlags, const nsAString & aCharacters, const nsAString & aUnmodifiedCharacters) { return _to SendNativeKeyEvent(aNativeKeyboardLayout, aNativeKeyCode, aModifierFlags, aCharacters, aUnmodifiedCharacters); } \
186  NS_SCRIPTABLE NS_IMETHOD Focus(nsIDOMElement *aElement) { return _to Focus(aElement); } \
187  NS_SCRIPTABLE NS_IMETHOD GarbageCollect(void) { return _to GarbageCollect(); } 
188
189/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
190#define NS_FORWARD_SAFE_NSIDOMWINDOWUTILS(_to) \
191  NS_SCRIPTABLE NS_IMETHOD GetImageAnimationMode(PRUint16 *aImageAnimationMode) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImageAnimationMode(aImageAnimationMode); } \
192  NS_SCRIPTABLE NS_IMETHOD SetImageAnimationMode(PRUint16 aImageAnimationMode) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetImageAnimationMode(aImageAnimationMode); } \
193  NS_SCRIPTABLE NS_IMETHOD GetDocCharsetIsForced(PRBool *aDocCharsetIsForced) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocCharsetIsForced(aDocCharsetIsForced); } \
194  NS_SCRIPTABLE NS_IMETHOD GetDocumentMetadata(const nsAString & aName, nsAString & _retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocumentMetadata(aName, _retval); } \
195  NS_SCRIPTABLE NS_IMETHOD Redraw(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Redraw(); } \
196  NS_SCRIPTABLE NS_IMETHOD SendMouseEvent(const nsAString & aType, PRInt32 aX, PRInt32 aY, PRInt32 aButton, PRInt32 aClickCount, PRInt32 aModifiers) { return !_to ? NS_ERROR_NULL_POINTER : _to->SendMouseEvent(aType, aX, aY, aButton, aClickCount, aModifiers); } \
197  NS_SCRIPTABLE NS_IMETHOD SendKeyEvent(const nsAString & aType, PRInt32 aKeyCode, PRInt32 aCharCode, PRInt32 aModifiers) { return !_to ? NS_ERROR_NULL_POINTER : _to->SendKeyEvent(aType, aKeyCode, aCharCode, aModifiers); } \
198  NS_SCRIPTABLE NS_IMETHOD SendNativeKeyEvent(PRInt32 aNativeKeyboardLayout, PRInt32 aNativeKeyCode, PRInt32 aModifierFlags, const nsAString & aCharacters, const nsAString & aUnmodifiedCharacters) { return !_to ? NS_ERROR_NULL_POINTER : _to->SendNativeKeyEvent(aNativeKeyboardLayout, aNativeKeyCode, aModifierFlags, aCharacters, aUnmodifiedCharacters); } \
199  NS_SCRIPTABLE NS_IMETHOD Focus(nsIDOMElement *aElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->Focus(aElement); } \
200  NS_SCRIPTABLE NS_IMETHOD GarbageCollect(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->GarbageCollect(); } 
201
202#if 0
203/* Use the code below as a template for the implementation class for this interface. */
204
205/* Header file */
206class nsDOMWindowUtils : public nsIDOMWindowUtils
207{
208public:
209  NS_DECL_ISUPPORTS
210  NS_DECL_NSIDOMWINDOWUTILS
211
212  nsDOMWindowUtils();
213
214private:
215  ~nsDOMWindowUtils();
216
217protected:
218  /* additional members */
219};
220
221/* Implementation file */
222NS_IMPL_ISUPPORTS1(nsDOMWindowUtils, nsIDOMWindowUtils)
223
224nsDOMWindowUtils::nsDOMWindowUtils()
225{
226  /* member initializers and constructor code */
227}
228
229nsDOMWindowUtils::~nsDOMWindowUtils()
230{
231  /* destructor code */
232}
233
234/* attribute unsigned short imageAnimationMode; */
235NS_IMETHODIMP nsDOMWindowUtils::GetImageAnimationMode(PRUint16 *aImageAnimationMode)
236{
237    return NS_ERROR_NOT_IMPLEMENTED;
238}
239NS_IMETHODIMP nsDOMWindowUtils::SetImageAnimationMode(PRUint16 aImageAnimationMode)
240{
241    return NS_ERROR_NOT_IMPLEMENTED;
242}
243
244/* readonly attribute boolean docCharsetIsForced; */
245NS_IMETHODIMP nsDOMWindowUtils::GetDocCharsetIsForced(PRBool *aDocCharsetIsForced)
246{
247    return NS_ERROR_NOT_IMPLEMENTED;
248}
249
250/* AString getDocumentMetadata (in AString aName); */
251NS_IMETHODIMP nsDOMWindowUtils::GetDocumentMetadata(const nsAString & aName, nsAString & _retval)
252{
253    return NS_ERROR_NOT_IMPLEMENTED;
254}
255
256/* void redraw (); */
257NS_IMETHODIMP nsDOMWindowUtils::Redraw()
258{
259    return NS_ERROR_NOT_IMPLEMENTED;
260}
261
262/* void sendMouseEvent (in AString aType, in long aX, in long aY, in long aButton, in long aClickCount, in long aModifiers); */
263NS_IMETHODIMP nsDOMWindowUtils::SendMouseEvent(const nsAString & aType, PRInt32 aX, PRInt32 aY, PRInt32 aButton, PRInt32 aClickCount, PRInt32 aModifiers)
264{
265    return NS_ERROR_NOT_IMPLEMENTED;
266}
267
268/* void sendKeyEvent (in AString aType, in long aKeyCode, in long aCharCode, in long aModifiers); */
269NS_IMETHODIMP nsDOMWindowUtils::SendKeyEvent(const nsAString & aType, PRInt32 aKeyCode, PRInt32 aCharCode, PRInt32 aModifiers)
270{
271    return NS_ERROR_NOT_IMPLEMENTED;
272}
273
274/* void sendNativeKeyEvent (in long aNativeKeyboardLayout, in long aNativeKeyCode, in long aModifierFlags, in AString aCharacters, in AString aUnmodifiedCharacters); */
275NS_IMETHODIMP nsDOMWindowUtils::SendNativeKeyEvent(PRInt32 aNativeKeyboardLayout, PRInt32 aNativeKeyCode, PRInt32 aModifierFlags, const nsAString & aCharacters, const nsAString & aUnmodifiedCharacters)
276{
277    return NS_ERROR_NOT_IMPLEMENTED;
278}
279
280/* void focus (in nsIDOMElement aElement); */
281NS_IMETHODIMP nsDOMWindowUtils::Focus(nsIDOMElement *aElement)
282{
283    return NS_ERROR_NOT_IMPLEMENTED;
284}
285
286/* void garbageCollect (); */
287NS_IMETHODIMP nsDOMWindowUtils::GarbageCollect()
288{
289    return NS_ERROR_NOT_IMPLEMENTED;
290}
291
292/* End of implementation class template. */
293#endif
294
295
296#endif /* __gen_nsIDOMWindowUtils_h__ */