nsIClipboardCommands.h 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  1. /*
  2. * DO NOT EDIT. THIS FILE IS GENERATED FROM c:/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 nsIClipboardCommands : public nsISupports {
  27. public:
  28. NS_DEFINE_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_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_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_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_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_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_IMETHOD CanPaste(PRBool *_retval) = 0;
  79. /**
  80. * Cut the current selection onto the clipboard.
  81. */
  82. /* void cutSelection (); */
  83. NS_IMETHOD CutSelection(void) = 0;
  84. /**
  85. * Copy the current selection onto the clipboard.
  86. */
  87. /* void copySelection (); */
  88. 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_IMETHOD CopyLinkLocation(void) = 0;
  95. /**
  96. * Copy the location of the selected image.
  97. */
  98. /* void copyImageLocation (); */
  99. NS_IMETHOD CopyImageLocation(void) = 0;
  100. /**
  101. * Copy the contents of the selected image.
  102. */
  103. /* void copyImageContents (); */
  104. NS_IMETHOD CopyImageContents(void) = 0;
  105. /**
  106. * Paste the contents of the clipboard into the current selection.
  107. */
  108. /* void paste (); */
  109. NS_IMETHOD Paste(void) = 0;
  110. /**
  111. * Select the entire contents.
  112. */
  113. /* void selectAll (); */
  114. 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_IMETHOD SelectNone(void) = 0;
  121. };
  122. /* Use this macro when declaring classes that implement this interface. */
  123. #define NS_DECL_NSICLIPBOARDCOMMANDS \
  124. NS_IMETHOD CanCutSelection(PRBool *_retval); \
  125. NS_IMETHOD CanCopySelection(PRBool *_retval); \
  126. NS_IMETHOD CanCopyLinkLocation(PRBool *_retval); \
  127. NS_IMETHOD CanCopyImageLocation(PRBool *_retval); \
  128. NS_IMETHOD CanCopyImageContents(PRBool *_retval); \
  129. NS_IMETHOD CanPaste(PRBool *_retval); \
  130. NS_IMETHOD CutSelection(void); \
  131. NS_IMETHOD CopySelection(void); \
  132. NS_IMETHOD CopyLinkLocation(void); \
  133. NS_IMETHOD CopyImageLocation(void); \
  134. NS_IMETHOD CopyImageContents(void); \
  135. NS_IMETHOD Paste(void); \
  136. NS_IMETHOD SelectAll(void); \
  137. NS_IMETHOD SelectNone(void);
  138. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  139. #define NS_FORWARD_NSICLIPBOARDCOMMANDS(_to) \
  140. NS_IMETHOD CanCutSelection(PRBool *_retval) { return _to CanCutSelection(_retval); } \
  141. NS_IMETHOD CanCopySelection(PRBool *_retval) { return _to CanCopySelection(_retval); } \
  142. NS_IMETHOD CanCopyLinkLocation(PRBool *_retval) { return _to CanCopyLinkLocation(_retval); } \
  143. NS_IMETHOD CanCopyImageLocation(PRBool *_retval) { return _to CanCopyImageLocation(_retval); } \
  144. NS_IMETHOD CanCopyImageContents(PRBool *_retval) { return _to CanCopyImageContents(_retval); } \
  145. NS_IMETHOD CanPaste(PRBool *_retval) { return _to CanPaste(_retval); } \
  146. NS_IMETHOD CutSelection(void) { return _to CutSelection(); } \
  147. NS_IMETHOD CopySelection(void) { return _to CopySelection(); } \
  148. NS_IMETHOD CopyLinkLocation(void) { return _to CopyLinkLocation(); } \
  149. NS_IMETHOD CopyImageLocation(void) { return _to CopyImageLocation(); } \
  150. NS_IMETHOD CopyImageContents(void) { return _to CopyImageContents(); } \
  151. NS_IMETHOD Paste(void) { return _to Paste(); } \
  152. NS_IMETHOD SelectAll(void) { return _to SelectAll(); } \
  153. NS_IMETHOD SelectNone(void) { return _to SelectNone(); }
  154. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  155. #define NS_FORWARD_SAFE_NSICLIPBOARDCOMMANDS(_to) \
  156. NS_IMETHOD CanCutSelection(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanCutSelection(_retval); } \
  157. NS_IMETHOD CanCopySelection(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanCopySelection(_retval); } \
  158. NS_IMETHOD CanCopyLinkLocation(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanCopyLinkLocation(_retval); } \
  159. NS_IMETHOD CanCopyImageLocation(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanCopyImageLocation(_retval); } \
  160. NS_IMETHOD CanCopyImageContents(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanCopyImageContents(_retval); } \
  161. NS_IMETHOD CanPaste(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanPaste(_retval); } \
  162. NS_IMETHOD CutSelection(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CutSelection(); } \
  163. NS_IMETHOD CopySelection(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopySelection(); } \
  164. NS_IMETHOD CopyLinkLocation(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyLinkLocation(); } \
  165. NS_IMETHOD CopyImageLocation(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyImageLocation(); } \
  166. NS_IMETHOD CopyImageContents(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->CopyImageContents(); } \
  167. NS_IMETHOD Paste(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Paste(); } \
  168. NS_IMETHOD SelectAll(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SelectAll(); } \
  169. NS_IMETHOD SelectNone(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->SelectNone(); }
  170. #if 0
  171. /* Use the code below as a template for the implementation class for this interface. */
  172. /* Header file */
  173. class nsClipboardCommands : public nsIClipboardCommands
  174. {
  175. public:
  176. NS_DECL_ISUPPORTS
  177. NS_DECL_NSICLIPBOARDCOMMANDS
  178. nsClipboardCommands();
  179. private:
  180. ~nsClipboardCommands();
  181. protected:
  182. /* additional members */
  183. };
  184. /* Implementation file */
  185. NS_IMPL_ISUPPORTS1(nsClipboardCommands, nsIClipboardCommands)
  186. nsClipboardCommands::nsClipboardCommands()
  187. {
  188. /* member initializers and constructor code */
  189. }
  190. nsClipboardCommands::~nsClipboardCommands()
  191. {
  192. /* destructor code */
  193. }
  194. /* boolean canCutSelection (); */
  195. NS_IMETHODIMP nsClipboardCommands::CanCutSelection(PRBool *_retval)
  196. {
  197. return NS_ERROR_NOT_IMPLEMENTED;
  198. }
  199. /* boolean canCopySelection (); */
  200. NS_IMETHODIMP nsClipboardCommands::CanCopySelection(PRBool *_retval)
  201. {
  202. return NS_ERROR_NOT_IMPLEMENTED;
  203. }
  204. /* boolean canCopyLinkLocation (); */
  205. NS_IMETHODIMP nsClipboardCommands::CanCopyLinkLocation(PRBool *_retval)
  206. {
  207. return NS_ERROR_NOT_IMPLEMENTED;
  208. }
  209. /* boolean canCopyImageLocation (); */
  210. NS_IMETHODIMP nsClipboardCommands::CanCopyImageLocation(PRBool *_retval)
  211. {
  212. return NS_ERROR_NOT_IMPLEMENTED;
  213. }
  214. /* boolean canCopyImageContents (); */
  215. NS_IMETHODIMP nsClipboardCommands::CanCopyImageContents(PRBool *_retval)
  216. {
  217. return NS_ERROR_NOT_IMPLEMENTED;
  218. }
  219. /* boolean canPaste (); */
  220. NS_IMETHODIMP nsClipboardCommands::CanPaste(PRBool *_retval)
  221. {
  222. return NS_ERROR_NOT_IMPLEMENTED;
  223. }
  224. /* void cutSelection (); */
  225. NS_IMETHODIMP nsClipboardCommands::CutSelection()
  226. {
  227. return NS_ERROR_NOT_IMPLEMENTED;
  228. }
  229. /* void copySelection (); */
  230. NS_IMETHODIMP nsClipboardCommands::CopySelection()
  231. {
  232. return NS_ERROR_NOT_IMPLEMENTED;
  233. }
  234. /* void copyLinkLocation (); */
  235. NS_IMETHODIMP nsClipboardCommands::CopyLinkLocation()
  236. {
  237. return NS_ERROR_NOT_IMPLEMENTED;
  238. }
  239. /* void copyImageLocation (); */
  240. NS_IMETHODIMP nsClipboardCommands::CopyImageLocation()
  241. {
  242. return NS_ERROR_NOT_IMPLEMENTED;
  243. }
  244. /* void copyImageContents (); */
  245. NS_IMETHODIMP nsClipboardCommands::CopyImageContents()
  246. {
  247. return NS_ERROR_NOT_IMPLEMENTED;
  248. }
  249. /* void paste (); */
  250. NS_IMETHODIMP nsClipboardCommands::Paste()
  251. {
  252. return NS_ERROR_NOT_IMPLEMENTED;
  253. }
  254. /* void selectAll (); */
  255. NS_IMETHODIMP nsClipboardCommands::SelectAll()
  256. {
  257. return NS_ERROR_NOT_IMPLEMENTED;
  258. }
  259. /* void selectNone (); */
  260. NS_IMETHODIMP nsClipboardCommands::SelectNone()
  261. {
  262. return NS_ERROR_NOT_IMPLEMENTED;
  263. }
  264. /* End of implementation class template. */
  265. #endif
  266. #endif /* __gen_nsIClipboardCommands_h__ */