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