OLD | NEW |
(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/nsITooltipListene
r.idl |
| 3 */ |
| 4 |
| 5 #ifndef __gen_nsITooltipListener_h__ |
| 6 #define __gen_nsITooltipListener_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: nsITooltipListener */ |
| 19 #define NS_ITOOLTIPLISTENER_IID_STR "44b78386-1dd2-11b2-9ad2-e4eee2ca1916" |
| 20 |
| 21 #define NS_ITOOLTIPLISTENER_IID \ |
| 22 {0x44b78386, 0x1dd2, 0x11b2, \ |
| 23 { 0x9a, 0xd2, 0xe4, 0xee, 0xe2, 0xca, 0x19, 0x16 }} |
| 24 |
| 25 /** |
| 26 * An optional interface for embedding clients wishing to receive |
| 27 * notifications for when a tooltip should be displayed or removed. |
| 28 * The embedder implements this interface on the web browser chrome |
| 29 * object associated with the window that notifications are required |
| 30 * for. |
| 31 * |
| 32 * @see nsITooltipTextProvider |
| 33 * |
| 34 * @status FROZEN |
| 35 */ |
| 36 class NS_NO_VTABLE nsITooltipListener : public nsISupports { |
| 37 public: |
| 38 |
| 39 NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITOOLTIPLISTENER_IID) |
| 40 |
| 41 /** |
| 42 * Called when a tooltip should be displayed. |
| 43 * |
| 44 * @param aXCoords The tooltip left edge X coordinate. |
| 45 * @param aYCoords The tooltip top edge Y coordinate. |
| 46 * @param aTipText The text to display in the tooltip, typically obtained |
| 47 * from the TITLE attribute of the node (or containing parent) |
| 48 * over which the pointer has been positioned. |
| 49 * |
| 50 * @note |
| 51 * Coordinates are specified in pixels, relative to the top-left |
| 52 * corner of the browser area. |
| 53 * |
| 54 * @return <code>NS_OK</code> if the tooltip was displayed. |
| 55 */ |
| 56 /* void onShowTooltip (in long aXCoords, in long aYCoords, in wstring aTipText
); */ |
| 57 NS_IMETHOD OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *
aTipText) = 0; |
| 58 |
| 59 /** |
| 60 * Called when the tooltip should be hidden, either because the pointer |
| 61 * has moved or the tooltip has timed out. |
| 62 */ |
| 63 /* void onHideTooltip (); */ |
| 64 NS_IMETHOD OnHideTooltip(void) = 0; |
| 65 |
| 66 }; |
| 67 |
| 68 /* Use this macro when declaring classes that implement this interface. */ |
| 69 #define NS_DECL_NSITOOLTIPLISTENER \ |
| 70 NS_IMETHOD OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *
aTipText); \ |
| 71 NS_IMETHOD OnHideTooltip(void); |
| 72 |
| 73 /* Use this macro to declare functions that forward the behavior of this interfa
ce to another object. */ |
| 74 #define NS_FORWARD_NSITOOLTIPLISTENER(_to) \ |
| 75 NS_IMETHOD OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *
aTipText) { return _to OnShowTooltip(aXCoords, aYCoords, aTipText); } \ |
| 76 NS_IMETHOD OnHideTooltip(void) { return _to OnHideTooltip(); } |
| 77 |
| 78 /* Use this macro to declare functions that forward the behavior of this interfa
ce to another object in a safe way. */ |
| 79 #define NS_FORWARD_SAFE_NSITOOLTIPLISTENER(_to) \ |
| 80 NS_IMETHOD OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *
aTipText) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnShowTooltip(aXCoords, a
YCoords, aTipText); } \ |
| 81 NS_IMETHOD OnHideTooltip(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->On
HideTooltip(); } |
| 82 |
| 83 #if 0 |
| 84 /* Use the code below as a template for the implementation class for this interf
ace. */ |
| 85 |
| 86 /* Header file */ |
| 87 class nsTooltipListener : public nsITooltipListener |
| 88 { |
| 89 public: |
| 90 NS_DECL_ISUPPORTS |
| 91 NS_DECL_NSITOOLTIPLISTENER |
| 92 |
| 93 nsTooltipListener(); |
| 94 |
| 95 private: |
| 96 ~nsTooltipListener(); |
| 97 |
| 98 protected: |
| 99 /* additional members */ |
| 100 }; |
| 101 |
| 102 /* Implementation file */ |
| 103 NS_IMPL_ISUPPORTS1(nsTooltipListener, nsITooltipListener) |
| 104 |
| 105 nsTooltipListener::nsTooltipListener() |
| 106 { |
| 107 /* member initializers and constructor code */ |
| 108 } |
| 109 |
| 110 nsTooltipListener::~nsTooltipListener() |
| 111 { |
| 112 /* destructor code */ |
| 113 } |
| 114 |
| 115 /* void onShowTooltip (in long aXCoords, in long aYCoords, in wstring aTipText);
*/ |
| 116 NS_IMETHODIMP nsTooltipListener::OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoord
s, const PRUnichar *aTipText) |
| 117 { |
| 118 return NS_ERROR_NOT_IMPLEMENTED; |
| 119 } |
| 120 |
| 121 /* void onHideTooltip (); */ |
| 122 NS_IMETHODIMP nsTooltipListener::OnHideTooltip() |
| 123 { |
| 124 return NS_ERROR_NOT_IMPLEMENTED; |
| 125 } |
| 126 |
| 127 /* End of implementation class template. */ |
| 128 #endif |
| 129 |
| 130 |
| 131 #endif /* __gen_nsITooltipListener_h__ */ |
OLD | NEW |