2
0

Drawable2D.cs 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. // WARNING - AUTOGENERATED - DO NOT EDIT
  2. //
  3. // Generated using `sharpie urho`
  4. //
  5. // Drawable2D.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.Urho2D
  18. {
  19. /// <summary>
  20. /// Base class for 2D visible components.
  21. /// </summary>
  22. public unsafe partial class Drawable2D : Drawable
  23. {
  24. unsafe partial void OnDrawable2DCreated ();
  25. [Preserve]
  26. public Drawable2D (IntPtr handle) : base (handle)
  27. {
  28. OnDrawable2DCreated ();
  29. }
  30. [Preserve]
  31. protected Drawable2D (UrhoObjectFlag emptyFlag) : base (emptyFlag)
  32. {
  33. OnDrawable2DCreated ();
  34. }
  35. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  36. internal static extern int Drawable2D_GetType (IntPtr handle);
  37. private StringHash UrhoGetType ()
  38. {
  39. Runtime.ValidateRefCounted (this);
  40. return new StringHash (Drawable2D_GetType (handle));
  41. }
  42. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  43. internal static extern IntPtr Drawable2D_GetTypeName (IntPtr handle);
  44. private string GetTypeName ()
  45. {
  46. Runtime.ValidateRefCounted (this);
  47. return Marshal.PtrToStringAnsi (Drawable2D_GetTypeName (handle));
  48. }
  49. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  50. internal static extern int Drawable2D_GetTypeStatic ();
  51. private static StringHash GetTypeStatic ()
  52. {
  53. Runtime.Validate (typeof(Drawable2D));
  54. return new StringHash (Drawable2D_GetTypeStatic ());
  55. }
  56. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  57. internal static extern IntPtr Drawable2D_GetTypeNameStatic ();
  58. private static string GetTypeNameStatic ()
  59. {
  60. Runtime.Validate (typeof(Drawable2D));
  61. return Marshal.PtrToStringAnsi (Drawable2D_GetTypeNameStatic ());
  62. }
  63. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  64. internal static extern void Drawable2D_RegisterObject (IntPtr context);
  65. /// <summary>
  66. /// Register object factory. Drawable must be registered first.
  67. /// </summary>
  68. public new static void RegisterObject (Context context)
  69. {
  70. Runtime.Validate (typeof(Drawable2D));
  71. Drawable2D_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
  72. }
  73. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  74. internal static extern void Drawable2D_OnSetEnabled (IntPtr handle);
  75. /// <summary>
  76. /// Handle enabled/disabled state change.
  77. /// </summary>
  78. public override void OnSetEnabled ()
  79. {
  80. Runtime.ValidateRefCounted (this);
  81. Drawable2D_OnSetEnabled (handle);
  82. }
  83. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  84. internal static extern void Drawable2D_SetLayer (IntPtr handle, int layer);
  85. /// <summary>
  86. /// Set layer.
  87. /// </summary>
  88. private void SetLayer (int layer)
  89. {
  90. Runtime.ValidateRefCounted (this);
  91. Drawable2D_SetLayer (handle, layer);
  92. }
  93. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  94. internal static extern void Drawable2D_SetOrderInLayer (IntPtr handle, int orderInLayer);
  95. /// <summary>
  96. /// Set order in layer.
  97. /// </summary>
  98. private void SetOrderInLayer (int orderInLayer)
  99. {
  100. Runtime.ValidateRefCounted (this);
  101. Drawable2D_SetOrderInLayer (handle, orderInLayer);
  102. }
  103. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  104. internal static extern int Drawable2D_GetLayer (IntPtr handle);
  105. /// <summary>
  106. /// Return layer.
  107. /// </summary>
  108. private int GetLayer ()
  109. {
  110. Runtime.ValidateRefCounted (this);
  111. return Drawable2D_GetLayer (handle);
  112. }
  113. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  114. internal static extern int Drawable2D_GetOrderInLayer (IntPtr handle);
  115. /// <summary>
  116. /// Return order in layer.
  117. /// </summary>
  118. private int GetOrderInLayer ()
  119. {
  120. Runtime.ValidateRefCounted (this);
  121. return Drawable2D_GetOrderInLayer (handle);
  122. }
  123. public override StringHash Type {
  124. get {
  125. return UrhoGetType ();
  126. }
  127. }
  128. public override string TypeName {
  129. get {
  130. return GetTypeName ();
  131. }
  132. }
  133. [Preserve]
  134. public new static StringHash TypeStatic {
  135. get {
  136. return GetTypeStatic ();
  137. }
  138. }
  139. public new static string TypeNameStatic {
  140. get {
  141. return GetTypeNameStatic ();
  142. }
  143. }
  144. /// <summary>
  145. /// Return layer.
  146. /// Or
  147. /// Set layer.
  148. /// </summary>
  149. public int Layer {
  150. get {
  151. return GetLayer ();
  152. }
  153. set {
  154. SetLayer (value);
  155. }
  156. }
  157. /// <summary>
  158. /// Return order in layer.
  159. /// Or
  160. /// Set order in layer.
  161. /// </summary>
  162. public int OrderInLayer {
  163. get {
  164. return GetOrderInLayer ();
  165. }
  166. set {
  167. SetOrderInLayer (value);
  168. }
  169. }
  170. }
  171. }