nsIKeyEventInPluginCallback.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /* -*- Mode: C++; tab-width: 40; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef nsIKeyEventInPluginCallback_h_
  6. #define nsIKeyEventInPluginCallback_h_
  7. #include "mozilla/EventForwards.h"
  8. #include "nsISupports.h"
  9. #define NS_IKEYEVENTINPLUGINCALLBACK_IID \
  10. { 0x543c5a8a, 0xc50e, 0x4cf9, \
  11. { 0xa6, 0xba, 0x29, 0xa1, 0xc5, 0xa5, 0x47, 0x07 } }
  12. class nsIKeyEventInPluginCallback : public nsISupports
  13. {
  14. public:
  15. NS_DECLARE_STATIC_IID_ACCESSOR(NS_IKEYEVENTINPLUGINCALLBACK_IID)
  16. /**
  17. * HandledWindowedPluginKeyEvent() is a callback method of
  18. * nsIWidget::OnWindowedPluginKeyEvent(). When it returns
  19. * NS_SUCCESS_EVENT_HANDLED_ASYNCHRONOUSLY, it should call this method
  20. * when the key event is handled.
  21. *
  22. * @param aKeyEventData The key event which was posted to the parent
  23. * process from a plugin process.
  24. * @param aIsConsumed true if aKeyEventData is consumed in the
  25. * parent process. Otherwise, false.
  26. */
  27. virtual void HandledWindowedPluginKeyEvent(
  28. const mozilla::NativeEventData& aKeyEventData,
  29. bool aIsConsumed) = 0;
  30. };
  31. NS_DEFINE_STATIC_IID_ACCESSOR(nsIKeyEventInPluginCallback,
  32. NS_IKEYEVENTINPLUGINCALLBACK_IID)
  33. #endif // #ifndef nsIKeyEventInPluginCallback_h_