PageRenderTime 233ms CodeModel.GetById 211ms app.highlight 3ms RepoModel.GetById 17ms app.codeStats 0ms

/gecko_api/include/nsITooltipListener.h

http://firefox-mac-pdf.googlecode.com/
C++ Header | 133 lines | 56 code | 28 blank | 49 comment | 0 complexity | 1d286b6581c85994adf94b3611a3cad6 MD5 | raw file
  1/*
  2 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/embedding/browser/webBrowser/nsITooltipListener.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 */
 36class NS_NO_VTABLE NS_SCRIPTABLE nsITooltipListener : public nsISupports {
 37 public: 
 38
 39  NS_DECLARE_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_SCRIPTABLE 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_SCRIPTABLE NS_IMETHOD OnHideTooltip(void) = 0;
 65
 66};
 67
 68  NS_DEFINE_STATIC_IID_ACCESSOR(nsITooltipListener, NS_ITOOLTIPLISTENER_IID)
 69
 70/* Use this macro when declaring classes that implement this interface. */
 71#define NS_DECL_NSITOOLTIPLISTENER \
 72  NS_SCRIPTABLE NS_IMETHOD OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText); \
 73  NS_SCRIPTABLE NS_IMETHOD OnHideTooltip(void); 
 74
 75/* Use this macro to declare functions that forward the behavior of this interface to another object. */
 76#define NS_FORWARD_NSITOOLTIPLISTENER(_to) \
 77  NS_SCRIPTABLE NS_IMETHOD OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText) { return _to OnShowTooltip(aXCoords, aYCoords, aTipText); } \
 78  NS_SCRIPTABLE NS_IMETHOD OnHideTooltip(void) { return _to OnHideTooltip(); } 
 79
 80/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
 81#define NS_FORWARD_SAFE_NSITOOLTIPLISTENER(_to) \
 82  NS_SCRIPTABLE NS_IMETHOD OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnShowTooltip(aXCoords, aYCoords, aTipText); } \
 83  NS_SCRIPTABLE NS_IMETHOD OnHideTooltip(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnHideTooltip(); } 
 84
 85#if 0
 86/* Use the code below as a template for the implementation class for this interface. */
 87
 88/* Header file */
 89class nsTooltipListener : public nsITooltipListener
 90{
 91public:
 92  NS_DECL_ISUPPORTS
 93  NS_DECL_NSITOOLTIPLISTENER
 94
 95  nsTooltipListener();
 96
 97private:
 98  ~nsTooltipListener();
 99
100protected:
101  /* additional members */
102};
103
104/* Implementation file */
105NS_IMPL_ISUPPORTS1(nsTooltipListener, nsITooltipListener)
106
107nsTooltipListener::nsTooltipListener()
108{
109  /* member initializers and constructor code */
110}
111
112nsTooltipListener::~nsTooltipListener()
113{
114  /* destructor code */
115}
116
117/* void onShowTooltip (in long aXCoords, in long aYCoords, in wstring aTipText); */
118NS_IMETHODIMP nsTooltipListener::OnShowTooltip(PRInt32 aXCoords, PRInt32 aYCoords, const PRUnichar *aTipText)
119{
120    return NS_ERROR_NOT_IMPLEMENTED;
121}
122
123/* void onHideTooltip (); */
124NS_IMETHODIMP nsTooltipListener::OnHideTooltip()
125{
126    return NS_ERROR_NOT_IMPLEMENTED;
127}
128
129/* End of implementation class template. */
130#endif
131
132
133#endif /* __gen_nsITooltipListener_h__ */