1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef mozilla_textinputdispatcherlistener_h_
6 #define mozilla_textinputdispatcherlistener_h_
8 #include "nsWeakReference.h"
13 class TextEventDispatcher
;
14 struct IMENotification
;
16 #define NS_TEXT_INPUT_PROXY_LISTENER_IID \
17 { 0xf2226f55, 0x6ddb, 0x40d5, \
18 { 0x8a, 0x24, 0xce, 0x4d, 0x5b, 0x38, 0x15, 0xf0 } };
20 class TextEventDispatcherListener
: public nsSupportsWeakReference
23 NS_DECLARE_STATIC_IID_ACCESSOR(NS_TEXT_INPUT_PROXY_LISTENER_IID
)
26 * NotifyIME() is called by TextEventDispatcher::NotifyIME(). This is a
27 * notification or request to IME. See document of nsIWidget::NotifyIME()
30 NS_IMETHOD
NotifyIME(TextEventDispatcher
* aTextEventDispatcher
,
31 const IMENotification
& aNotification
) = 0;
34 * OnRemovedFrom() is called when the TextEventDispatcher stops working and
35 * is releasing the listener.
37 NS_IMETHOD_(void) OnRemovedFrom(
38 TextEventDispatcher
* aTextEventDispatcher
) = 0;
41 NS_DEFINE_STATIC_IID_ACCESSOR(TextEventDispatcherListener
,
42 NS_TEXT_INPUT_PROXY_LISTENER_IID
)
45 } // namespace mozilla
47 #endif // #ifndef mozilla_textinputdispatcherlistener_h_