CefAccessibilityHandler.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. namespace Xilium.CefGlue
  2. {
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Diagnostics;
  6. using System.Runtime.InteropServices;
  7. using Xilium.CefGlue.Interop;
  8. /// <summary>
  9. /// Implement this interface to receive accessibility notification when
  10. /// accessibility events have been registered. The methods of this class will
  11. /// be called on the UI thread.
  12. /// </summary>
  13. public abstract unsafe partial class CefAccessibilityHandler
  14. {
  15. private void on_accessibility_tree_change(cef_accessibility_handler_t* self, cef_value_t* value)
  16. {
  17. CheckSelf(self);
  18. using (var mValue = CefValue.FromNativeOrNull(value))
  19. {
  20. OnAccessibilityTreeChange(mValue);
  21. }
  22. }
  23. /// <summary>
  24. /// Called after renderer process sends accessibility tree changes to the
  25. /// browser process.
  26. /// </summary>
  27. protected abstract void OnAccessibilityTreeChange(CefValue value);
  28. private void on_accessibility_location_change(cef_accessibility_handler_t* self, cef_value_t* value)
  29. {
  30. CheckSelf(self);
  31. using (var mValue = CefValue.FromNativeOrNull(value))
  32. {
  33. OnAccessibilityLocationChange(mValue);
  34. }
  35. }
  36. /// <summary>
  37. /// Called after renderer process sends accessibility location changes to the
  38. /// browser process.
  39. /// </summary>
  40. protected abstract void OnAccessibilityLocationChange(CefValue value);
  41. }
  42. }