EventReceiverGroup.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. // WARNING - AUTOGENERATED - DO NOT EDIT
  2. //
  3. // Generated using `sharpie urho`
  4. //
  5. // EventReceiverGroup.cs
  6. //
  7. // Copyright 2015 Xamarin Inc. All rights reserved.
  8. using System;
  9. using System.Runtime.InteropServices;
  10. using System.Collections.Generic;
  11. using Urho.Urho2D;
  12. using Urho.Gui;
  13. using Urho.Resources;
  14. using Urho.IO;
  15. using Urho.Navigation;
  16. using Urho.Network;
  17. namespace Urho
  18. {
  19. /// <summary>
  20. /// Tracking structure for event receivers.
  21. /// </summary>
  22. public unsafe partial class EventReceiverGroup : RefCounted
  23. {
  24. unsafe partial void OnEventReceiverGroupCreated ();
  25. [Preserve]
  26. public EventReceiverGroup (IntPtr handle) : base (handle)
  27. {
  28. OnEventReceiverGroupCreated ();
  29. }
  30. [Preserve]
  31. protected EventReceiverGroup (UrhoObjectFlag emptyFlag) : base (emptyFlag)
  32. {
  33. OnEventReceiverGroupCreated ();
  34. }
  35. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  36. internal static extern IntPtr EventReceiverGroup_EventReceiverGroup ();
  37. [Preserve]
  38. public EventReceiverGroup () : base (UrhoObjectFlag.Empty)
  39. {
  40. Runtime.Validate (typeof(EventReceiverGroup));
  41. handle = EventReceiverGroup_EventReceiverGroup ();
  42. Runtime.RegisterObject (this);
  43. OnEventReceiverGroupCreated ();
  44. }
  45. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  46. internal static extern void EventReceiverGroup_BeginSendEvent (IntPtr handle);
  47. /// <summary>
  48. /// Begin event send. When receivers are removed during send, group has to be cleaned up afterward.
  49. /// </summary>
  50. public void BeginSendEvent ()
  51. {
  52. Runtime.ValidateRefCounted (this);
  53. EventReceiverGroup_BeginSendEvent (handle);
  54. }
  55. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  56. internal static extern void EventReceiverGroup_EndSendEvent (IntPtr handle);
  57. /// <summary>
  58. /// End event send. Clean up if necessary.
  59. /// </summary>
  60. public void EndSendEvent ()
  61. {
  62. Runtime.ValidateRefCounted (this);
  63. EventReceiverGroup_EndSendEvent (handle);
  64. }
  65. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  66. internal static extern void EventReceiverGroup_Add (IntPtr handle, IntPtr @object);
  67. /// <summary>
  68. /// Add receiver. Same receiver must not be double-added!
  69. /// </summary>
  70. public void Add (Urho.UrhoObject @object)
  71. {
  72. Runtime.ValidateRefCounted (this);
  73. EventReceiverGroup_Add (handle, (object)@object == null ? IntPtr.Zero : @object.Handle);
  74. }
  75. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  76. internal static extern void EventReceiverGroup_Remove (IntPtr handle, IntPtr @object);
  77. /// <summary>
  78. /// Remove receiver. Leave holes during send, which requires later cleanup.
  79. /// </summary>
  80. public void Remove (Urho.UrhoObject @object)
  81. {
  82. Runtime.ValidateRefCounted (this);
  83. EventReceiverGroup_Remove (handle, (object)@object == null ? IntPtr.Zero : @object.Handle);
  84. }
  85. }
  86. }