PageRenderTime 88ms CodeModel.GetById 76ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/gecko_api/include/nsIClipboardCommands.h

http://firefox-mac-pdf.googlecode.com/
C++ Header | 319 lines | 152 code | 52 blank | 115 comment | 0 complexity | 6ccaf3b1dd7694da451d14a2c1fd7fb5 MD5 | raw file
  1/*
  2 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/webshell/public/nsIClipboardCommands.idl
  3 */
  4
  5#ifndef __gen_nsIClipboardCommands_h__
  6#define __gen_nsIClipboardCommands_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
 18/* starting interface:    nsIClipboardCommands */
 19#define NS_ICLIPBOARDCOMMANDS_IID_STR "b8100c90-73be-11d2-92a5-00105a1b0d64"
 20
 21#define NS_ICLIPBOARDCOMMANDS_IID \
 22  {0xb8100c90, 0x73be, 0x11d2, \
 23    { 0x92, 0xa5, 0x00, 0x10, 0x5a, 0x1b, 0x0d, 0x64 }}
 24
 25/**
 26 * An interface for embedding clients who wish to interact with
 27 * the system-wide OS clipboard. Mozilla does not use a private
 28 * clipboard, instead it places its data directly onto the system 
 29 * clipboard. The webshell implements this interface.
 30 *
 31 * @status FROZEN
 32 */
 33class NS_NO_VTABLE NS_SCRIPTABLE nsIClipboardCommands : public nsISupports {
 34 public: 
 35
 36  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICLIPBOARDCOMMANDS_IID)
 37
 38  /**
 39   * Returns whether there is a selection and it is not read-only.
 40   *
 41   * @return <code>true</code> if the current selection can be cut,
 42   *          <code>false</code> otherwise.
 43   */
 44  /* boolean canCutSelection (); */
 45  NS_SCRIPTABLE NS_IMETHOD CanCutSelection(PRBool *_retval) = 0;
 46
 47  /**
 48   * Returns whether there is a selection and it is copyable.
 49   *
 50   * @return <code>true</code> if there is a selection,
 51   *          <code>false</code> otherwise.
 52   */
 53  /* boolean canCopySelection (); */
 54  NS_SCRIPTABLE NS_IMETHOD CanCopySelection(PRBool *_retval) = 0;
 55
 56  /**
 57   * Returns whether we can copy a link location.
 58   *
 59   * @return <code>true</code> if a link is selected,
 60   *           <code>false</code> otherwise.
 61   */
 62  /* boolean canCopyLinkLocation (); */
 63  NS_SCRIPTABLE NS_IMETHOD CanCopyLinkLocation(PRBool *_retval) = 0;
 64
 65  /**
 66   * Returns whether we can copy an image location.
 67   *
 68   * @return <code>true</code> if an image is selected,
 69              <code>false</code> otherwise.
 70   */
 71  /* boolean canCopyImageLocation (); */
 72  NS_SCRIPTABLE NS_IMETHOD CanCopyImageLocation(PRBool *_retval) = 0;
 73
 74  /**
 75   * Returns whether we can copy an image's contents.
 76   *
 77   * @return <code>true</code> if an image is selected,
 78   *          <code>false</code> otherwise
 79   */
 80  /* boolean canCopyImageContents (); */
 81  NS_SCRIPTABLE NS_IMETHOD CanCopyImageContents(PRBool *_retval) = 0;
 82
 83  /**
 84   * Returns whether the current contents of the clipboard can be
 85   * pasted and if the current selection is not read-only.
 86   *
 87   * @return <code>true</code> there is data to paste on the clipboard
 88   *          and the current selection is not read-only,
 89   *          <code>false</code> otherwise
 90   */
 91  /* boolean canPaste (); */
 92  NS_SCRIPTABLE NS_IMETHOD CanPaste(PRBool *_retval) = 0;
 93
 94  /**
 95   * Cut the current selection onto the clipboard.
 96   */
 97  /* void cutSelection (); */
 98  NS_SCRIPTABLE NS_IMETHOD CutSelection(void) = 0;
 99
100  /**
101   * Copy the current selection onto the clipboard.
102   */
103  /* void copySelection (); */
104  NS_SCRIPTABLE NS_IMETHOD CopySelection(void) = 0;
105
106  /**
107   * Copy the link location of the current selection (e.g.,
108   * the |href| attribute of a selected |a| tag).
109   */
110  /* void copyLinkLocation (); */
111  NS_SCRIPTABLE NS_IMETHOD CopyLinkLocation(void) = 0;
112
113  /**
114   * Copy the location of the selected image.
115   */
116  /* void copyImageLocation (); */
117  NS_SCRIPTABLE NS_IMETHOD CopyImageLocation(void) = 0;
118
119  /**
120   * Copy the contents of the selected image.
121   */
122  /* void copyImageContents (); */
123  NS_SCRIPTABLE NS_IMETHOD CopyImageContents(void) = 0;
124
125  /**
126   * Paste the contents of the clipboard into the current selection.
127   */
128  /* void paste (); */
129  NS_SCRIPTABLE NS_IMETHOD Paste(void) = 0;
130
131  /**
132   * Select the entire contents.
133   */
134  /* void selectAll (); */
135  NS_SCRIPTABLE NS_IMETHOD SelectAll(void) = 0;
136
137  /**
138   * Clear the current selection (if any). Insertion point ends up
139   * at beginning of current selection.
140   */
141  /* void selectNone (); */
142  NS_SCRIPTABLE NS_IMETHOD SelectNone(void) = 0;
143
144};
145
146  NS_DEFINE_STATIC_IID_ACCESSOR(nsIClipboardCommands, NS_ICLIPBOARDCOMMANDS_IID)
147
148/* Use this macro when declaring classes that implement this interface. */
149#define NS_DECL_NSICLIPBOARDCOMMANDS \
150  NS_SCRIPTABLE NS_IMETHOD CanCutSelection(PRBool *_retval); \
151  NS_SCRIPTABLE NS_IMETHOD CanCopySelection(PRBool *_retval); \
152  NS_SCRIPTABLE NS_IMETHOD CanCopyLinkLocation(PRBool *_retval); \
153  NS_SCRIPTABLE NS_IMETHOD CanCopyImageLocation(PRBool *_retval); \
154  NS_SCRIPTABLE NS_IMETHOD CanCopyImageContents(PRBool *_retval); \
155  NS_SCRIPTABLE NS_IMETHOD CanPaste(PRBool *_retval); \
156  NS_SCRIPTABLE NS_IMETHOD CutSelection(void); \
157  NS_SCRIPTABLE NS_IMETHOD CopySelection(void); \
158  NS_SCRIPTABLE NS_IMETHOD CopyLinkLocation(void); \
159  NS_SCRIPTABLE NS_IMETHOD CopyImageLocation(void); \
160  NS_SCRIPTABLE NS_IMETHOD CopyImageContents(void); \
161  NS_SCRIPTABLE NS_IMETHOD Paste(void); \
162  NS_SCRIPTABLE NS_IMETHOD SelectAll(void); \
163  NS_SCRIPTABLE NS_IMETHOD SelectNone(void); 
164
165/* Use this macro to declare functions that forward the behavior of this interface to another object. */
166#define NS_FORWARD_NSICLIPBOARDCOMMANDS(_to) \
167  NS_SCRIPTABLE NS_IMETHOD CanCutSelection(PRBool *_retval) { return _to CanCutSelection(_retval); } \
168  NS_SCRIPTABLE NS_IMETHOD CanCopySelection(PRBool *_retval) { return _to CanCopySelection(_retval); } \
169  NS_SCRIPTABLE NS_IMETHOD CanCopyLinkLocation(PRBool *_retval) { return _to CanCopyLinkLocation(_retval); } \
170  NS_SCRIPTABLE NS_IMETHOD CanCopyImageLocation(PRBool *_retval) { return _to CanCopyImageLocation(_retval); } \
171  NS_SCRIPTABLE NS_IMETHOD CanCopyImageContents(PRBool *_retval) { return _to CanCopyImageContents(_retval); } \
172  NS_SCRIPTABLE NS_IMETHOD CanPaste(PRBool *_retval) { return _to CanPaste(_retval); } \
173  NS_SCRIPTABLE NS_IMETHOD CutSelection(void) { return _to CutSelection(); } \
174  NS_SCRIPTABLE NS_IMETHOD CopySelection(void) { return _to CopySelection(); } \
175  NS_SCRIPTABLE NS_IMETHOD CopyLinkLocation(void) { return _to CopyLinkLocation(); } \
176  NS_SCRIPTABLE NS_IMETHOD CopyImageLocation(void) { return _to CopyImageLocation(); } \
177  NS_SCRIPTABLE NS_IMETHOD CopyImageContents(void) { return _to CopyImageContents(); } \
178  NS_SCRIPTABLE NS_IMETHOD Paste(void) { return _to Paste(); } \
179  NS_SCRIPTABLE NS_IMETHOD SelectAll(void) { return _to SelectAll(); } \
180  NS_SCRIPTABLE NS_IMETHOD SelectNone(void) { return _to SelectNone(); } 
181
182/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
183#define NS_FORWARD_SAFE_NSICLIPBOARDCOMMANDS(_to) \
184  NS_SCRIPTABLE NS_IMETHOD CanCutSelection(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanCutSelection(_retval); } \
185  NS_SCRIPTABLE NS_IMETHOD CanCopySelection(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanCopySelection(_retval); } \
186  NS_SCRIPTABLE NS_IMETHOD CanCopyLinkLocation(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanCopyLinkLocation(_retval); } \
187  NS_SCRIPTABLE NS_IMETHOD CanCopyImageLocation(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanCopyImageLocation(_retval); } \
188  NS_SCRIPTABLE NS_IMETHOD CanCopyImageContents(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanCopyImageContents(_retval); } \
189  NS_SCRIPTABLE NS_IMETHOD CanPaste(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanPaste(_retval); } \
190  NS_SCRIPTABLE NS_IMETHOD CutSelection(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CutSelection(); } \
191  NS_SCRIPTABLE NS_IMETHOD CopySelection(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopySelection(); } \
192  NS_SCRIPTABLE NS_IMETHOD CopyLinkLocation(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyLinkLocation(); } \
193  NS_SCRIPTABLE NS_IMETHOD CopyImageLocation(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyImageLocation(); } \
194  NS_SCRIPTABLE NS_IMETHOD CopyImageContents(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyImageContents(); } \
195  NS_SCRIPTABLE NS_IMETHOD Paste(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Paste(); } \
196  NS_SCRIPTABLE NS_IMETHOD SelectAll(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SelectAll(); } \
197  NS_SCRIPTABLE NS_IMETHOD SelectNone(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SelectNone(); } 
198
199#if 0
200/* Use the code below as a template for the implementation class for this interface. */
201
202/* Header file */
203class nsClipboardCommands : public nsIClipboardCommands
204{
205public:
206  NS_DECL_ISUPPORTS
207  NS_DECL_NSICLIPBOARDCOMMANDS
208
209  nsClipboardCommands();
210
211private:
212  ~nsClipboardCommands();
213
214protected:
215  /* additional members */
216};
217
218/* Implementation file */
219NS_IMPL_ISUPPORTS1(nsClipboardCommands, nsIClipboardCommands)
220
221nsClipboardCommands::nsClipboardCommands()
222{
223  /* member initializers and constructor code */
224}
225
226nsClipboardCommands::~nsClipboardCommands()
227{
228  /* destructor code */
229}
230
231/* boolean canCutSelection (); */
232NS_IMETHODIMP nsClipboardCommands::CanCutSelection(PRBool *_retval)
233{
234    return NS_ERROR_NOT_IMPLEMENTED;
235}
236
237/* boolean canCopySelection (); */
238NS_IMETHODIMP nsClipboardCommands::CanCopySelection(PRBool *_retval)
239{
240    return NS_ERROR_NOT_IMPLEMENTED;
241}
242
243/* boolean canCopyLinkLocation (); */
244NS_IMETHODIMP nsClipboardCommands::CanCopyLinkLocation(PRBool *_retval)
245{
246    return NS_ERROR_NOT_IMPLEMENTED;
247}
248
249/* boolean canCopyImageLocation (); */
250NS_IMETHODIMP nsClipboardCommands::CanCopyImageLocation(PRBool *_retval)
251{
252    return NS_ERROR_NOT_IMPLEMENTED;
253}
254
255/* boolean canCopyImageContents (); */
256NS_IMETHODIMP nsClipboardCommands::CanCopyImageContents(PRBool *_retval)
257{
258    return NS_ERROR_NOT_IMPLEMENTED;
259}
260
261/* boolean canPaste (); */
262NS_IMETHODIMP nsClipboardCommands::CanPaste(PRBool *_retval)
263{
264    return NS_ERROR_NOT_IMPLEMENTED;
265}
266
267/* void cutSelection (); */
268NS_IMETHODIMP nsClipboardCommands::CutSelection()
269{
270    return NS_ERROR_NOT_IMPLEMENTED;
271}
272
273/* void copySelection (); */
274NS_IMETHODIMP nsClipboardCommands::CopySelection()
275{
276    return NS_ERROR_NOT_IMPLEMENTED;
277}
278
279/* void copyLinkLocation (); */
280NS_IMETHODIMP nsClipboardCommands::CopyLinkLocation()
281{
282    return NS_ERROR_NOT_IMPLEMENTED;
283}
284
285/* void copyImageLocation (); */
286NS_IMETHODIMP nsClipboardCommands::CopyImageLocation()
287{
288    return NS_ERROR_NOT_IMPLEMENTED;
289}
290
291/* void copyImageContents (); */
292NS_IMETHODIMP nsClipboardCommands::CopyImageContents()
293{
294    return NS_ERROR_NOT_IMPLEMENTED;
295}
296
297/* void paste (); */
298NS_IMETHODIMP nsClipboardCommands::Paste()
299{
300    return NS_ERROR_NOT_IMPLEMENTED;
301}
302
303/* void selectAll (); */
304NS_IMETHODIMP nsClipboardCommands::SelectAll()
305{
306    return NS_ERROR_NOT_IMPLEMENTED;
307}
308
309/* void selectNone (); */
310NS_IMETHODIMP nsClipboardCommands::SelectNone()
311{
312    return NS_ERROR_NOT_IMPLEMENTED;
313}
314
315/* End of implementation class template. */
316#endif
317
318
319#endif /* __gen_nsIClipboardCommands_h__ */