BorderImage.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  1. // WARNING - AUTOGENERATED - DO NOT EDIT
  2. //
  3. // Generated using `sharpie urho`
  4. //
  5. // BorderImage.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.Gui
  18. {
  19. /// <summary>
  20. /// %Image %UI element with optional border.
  21. /// </summary>
  22. public unsafe partial class BorderImage : UIElement
  23. {
  24. unsafe partial void OnBorderImageCreated ();
  25. [Preserve]
  26. public BorderImage (IntPtr handle) : base (handle)
  27. {
  28. OnBorderImageCreated ();
  29. }
  30. [Preserve]
  31. protected BorderImage (UrhoObjectFlag emptyFlag) : base (emptyFlag)
  32. {
  33. OnBorderImageCreated ();
  34. }
  35. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  36. internal static extern int BorderImage_GetType (IntPtr handle);
  37. private StringHash UrhoGetType ()
  38. {
  39. Runtime.ValidateRefCounted (this);
  40. return new StringHash (BorderImage_GetType (handle));
  41. }
  42. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  43. internal static extern IntPtr BorderImage_GetTypeName (IntPtr handle);
  44. private string GetTypeName ()
  45. {
  46. Runtime.ValidateRefCounted (this);
  47. return Marshal.PtrToStringAnsi (BorderImage_GetTypeName (handle));
  48. }
  49. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  50. internal static extern int BorderImage_GetTypeStatic ();
  51. private static StringHash GetTypeStatic ()
  52. {
  53. Runtime.Validate (typeof(BorderImage));
  54. return new StringHash (BorderImage_GetTypeStatic ());
  55. }
  56. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  57. internal static extern IntPtr BorderImage_GetTypeNameStatic ();
  58. private static string GetTypeNameStatic ()
  59. {
  60. Runtime.Validate (typeof(BorderImage));
  61. return Marshal.PtrToStringAnsi (BorderImage_GetTypeNameStatic ());
  62. }
  63. [Preserve]
  64. public BorderImage () : this (Application.CurrentContext)
  65. {
  66. }
  67. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  68. internal static extern IntPtr BorderImage_BorderImage (IntPtr context);
  69. [Preserve]
  70. public BorderImage (Context context) : base (UrhoObjectFlag.Empty)
  71. {
  72. Runtime.Validate (typeof(BorderImage));
  73. handle = BorderImage_BorderImage ((object)context == null ? IntPtr.Zero : context.Handle);
  74. Runtime.RegisterObject (this);
  75. OnBorderImageCreated ();
  76. }
  77. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  78. internal static extern void BorderImage_RegisterObject (IntPtr context);
  79. /// <summary>
  80. /// Register object factory.
  81. /// </summary>
  82. public new static void RegisterObject (Context context)
  83. {
  84. Runtime.Validate (typeof(BorderImage));
  85. BorderImage_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
  86. }
  87. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  88. internal static extern void BorderImage_SetTexture (IntPtr handle, IntPtr texture);
  89. /// <summary>
  90. /// Set texture.
  91. /// </summary>
  92. private void SetTexture (Texture texture)
  93. {
  94. Runtime.ValidateRefCounted (this);
  95. BorderImage_SetTexture (handle, (object)texture == null ? IntPtr.Zero : texture.Handle);
  96. }
  97. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  98. internal static extern void BorderImage_SetImageRect (IntPtr handle, ref Urho.IntRect rect);
  99. /// <summary>
  100. /// Set part of texture to use as the image.
  101. /// </summary>
  102. private void SetImageRect (Urho.IntRect rect)
  103. {
  104. Runtime.ValidateRefCounted (this);
  105. BorderImage_SetImageRect (handle, ref rect);
  106. }
  107. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  108. internal static extern void BorderImage_SetFullImageRect (IntPtr handle);
  109. /// <summary>
  110. /// Use whole texture as the image.
  111. /// </summary>
  112. public void SetFullImageRect ()
  113. {
  114. Runtime.ValidateRefCounted (this);
  115. BorderImage_SetFullImageRect (handle);
  116. }
  117. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  118. internal static extern void BorderImage_SetBorder (IntPtr handle, ref Urho.IntRect rect);
  119. /// <summary>
  120. /// Set border dimensions on the screen.
  121. /// </summary>
  122. private void SetBorder (Urho.IntRect rect)
  123. {
  124. Runtime.ValidateRefCounted (this);
  125. BorderImage_SetBorder (handle, ref rect);
  126. }
  127. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  128. internal static extern void BorderImage_SetImageBorder (IntPtr handle, ref Urho.IntRect rect);
  129. /// <summary>
  130. /// Set border dimensions on the image. If zero (default) uses the screen dimensions, resulting in pixel-perfect borders.
  131. /// </summary>
  132. private void SetImageBorder (Urho.IntRect rect)
  133. {
  134. Runtime.ValidateRefCounted (this);
  135. BorderImage_SetImageBorder (handle, ref rect);
  136. }
  137. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  138. internal static extern void BorderImage_SetHoverOffset (IntPtr handle, ref Urho.IntVector2 offset);
  139. /// <summary>
  140. /// Set offset to image rectangle used on hover.
  141. /// </summary>
  142. private void SetHoverOffset (Urho.IntVector2 offset)
  143. {
  144. Runtime.ValidateRefCounted (this);
  145. BorderImage_SetHoverOffset (handle, ref offset);
  146. }
  147. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  148. internal static extern void BorderImage_SetHoverOffset0 (IntPtr handle, int x, int y);
  149. /// <summary>
  150. /// Set offset to image rectangle used on hover.
  151. /// </summary>
  152. public void SetHoverOffset (int x, int y)
  153. {
  154. Runtime.ValidateRefCounted (this);
  155. BorderImage_SetHoverOffset0 (handle, x, y);
  156. }
  157. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  158. internal static extern void BorderImage_SetBlendMode (IntPtr handle, BlendMode mode);
  159. /// <summary>
  160. /// Set blend mode.
  161. /// </summary>
  162. private void SetBlendMode (BlendMode mode)
  163. {
  164. Runtime.ValidateRefCounted (this);
  165. BorderImage_SetBlendMode (handle, mode);
  166. }
  167. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  168. internal static extern void BorderImage_SetTiled (IntPtr handle, bool enable);
  169. /// <summary>
  170. /// Set tiled mode.
  171. /// </summary>
  172. private void SetTiled (bool enable)
  173. {
  174. Runtime.ValidateRefCounted (this);
  175. BorderImage_SetTiled (handle, enable);
  176. }
  177. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  178. internal static extern IntPtr BorderImage_GetTexture (IntPtr handle);
  179. /// <summary>
  180. /// Return texture.
  181. /// </summary>
  182. private Texture GetTexture ()
  183. {
  184. Runtime.ValidateRefCounted (this);
  185. return Runtime.LookupObject<Texture> (BorderImage_GetTexture (handle));
  186. }
  187. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  188. internal static extern Urho.IntRect BorderImage_GetImageRect (IntPtr handle);
  189. /// <summary>
  190. /// Return image rectangle.
  191. /// </summary>
  192. private Urho.IntRect GetImageRect ()
  193. {
  194. Runtime.ValidateRefCounted (this);
  195. return BorderImage_GetImageRect (handle);
  196. }
  197. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  198. internal static extern Urho.IntRect BorderImage_GetBorder (IntPtr handle);
  199. /// <summary>
  200. /// Return border screen dimensions.
  201. /// </summary>
  202. private Urho.IntRect GetBorder ()
  203. {
  204. Runtime.ValidateRefCounted (this);
  205. return BorderImage_GetBorder (handle);
  206. }
  207. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  208. internal static extern Urho.IntRect BorderImage_GetImageBorder (IntPtr handle);
  209. /// <summary>
  210. /// Return border image dimensions. Zero rect uses border screen dimensions.
  211. /// </summary>
  212. private Urho.IntRect GetImageBorder ()
  213. {
  214. Runtime.ValidateRefCounted (this);
  215. return BorderImage_GetImageBorder (handle);
  216. }
  217. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  218. internal static extern Urho.IntVector2 BorderImage_GetHoverOffset (IntPtr handle);
  219. /// <summary>
  220. /// Return offset to image rectangle used on hover.
  221. /// </summary>
  222. private Urho.IntVector2 GetHoverOffset ()
  223. {
  224. Runtime.ValidateRefCounted (this);
  225. return BorderImage_GetHoverOffset (handle);
  226. }
  227. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  228. internal static extern BlendMode BorderImage_GetBlendMode (IntPtr handle);
  229. /// <summary>
  230. /// Return blend mode.
  231. /// </summary>
  232. private BlendMode GetBlendMode ()
  233. {
  234. Runtime.ValidateRefCounted (this);
  235. return BorderImage_GetBlendMode (handle);
  236. }
  237. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  238. internal static extern bool BorderImage_IsTiled (IntPtr handle);
  239. /// <summary>
  240. /// Return whether is tiled.
  241. /// </summary>
  242. private bool IsTiled ()
  243. {
  244. Runtime.ValidateRefCounted (this);
  245. return BorderImage_IsTiled (handle);
  246. }
  247. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  248. internal static extern ResourceRef BorderImage_GetTextureAttr (IntPtr handle);
  249. /// <summary>
  250. /// Return texture attribute.
  251. /// </summary>
  252. private ResourceRef GetTextureAttr ()
  253. {
  254. Runtime.ValidateRefCounted (this);
  255. return BorderImage_GetTextureAttr (handle);
  256. }
  257. public override StringHash Type {
  258. get {
  259. return UrhoGetType ();
  260. }
  261. }
  262. public override string TypeName {
  263. get {
  264. return GetTypeName ();
  265. }
  266. }
  267. [Preserve]
  268. public new static StringHash TypeStatic {
  269. get {
  270. return GetTypeStatic ();
  271. }
  272. }
  273. public new static string TypeNameStatic {
  274. get {
  275. return GetTypeNameStatic ();
  276. }
  277. }
  278. /// <summary>
  279. /// Return texture.
  280. /// Or
  281. /// Set texture.
  282. /// </summary>
  283. public Texture Texture {
  284. get {
  285. return GetTexture ();
  286. }
  287. set {
  288. SetTexture (value);
  289. }
  290. }
  291. /// <summary>
  292. /// Return image rectangle.
  293. /// Or
  294. /// Set part of texture to use as the image.
  295. /// </summary>
  296. public Urho.IntRect ImageRect {
  297. get {
  298. return GetImageRect ();
  299. }
  300. set {
  301. SetImageRect (value);
  302. }
  303. }
  304. /// <summary>
  305. /// Return border screen dimensions.
  306. /// Or
  307. /// Set border dimensions on the screen.
  308. /// </summary>
  309. public Urho.IntRect Border {
  310. get {
  311. return GetBorder ();
  312. }
  313. set {
  314. SetBorder (value);
  315. }
  316. }
  317. /// <summary>
  318. /// Return border image dimensions. Zero rect uses border screen dimensions.
  319. /// Or
  320. /// Set border dimensions on the image. If zero (default) uses the screen dimensions, resulting in pixel-perfect borders.
  321. /// </summary>
  322. public Urho.IntRect ImageBorder {
  323. get {
  324. return GetImageBorder ();
  325. }
  326. set {
  327. SetImageBorder (value);
  328. }
  329. }
  330. /// <summary>
  331. /// Return offset to image rectangle used on hover.
  332. /// Or
  333. /// Set offset to image rectangle used on hover.
  334. /// </summary>
  335. public Urho.IntVector2 HoverOffset {
  336. get {
  337. return GetHoverOffset ();
  338. }
  339. set {
  340. SetHoverOffset (value);
  341. }
  342. }
  343. /// <summary>
  344. /// Return blend mode.
  345. /// Or
  346. /// Set blend mode.
  347. /// </summary>
  348. public BlendMode BlendMode {
  349. get {
  350. return GetBlendMode ();
  351. }
  352. set {
  353. SetBlendMode (value);
  354. }
  355. }
  356. /// <summary>
  357. /// Return whether is tiled.
  358. /// Or
  359. /// Set tiled mode.
  360. /// </summary>
  361. public bool Tiled {
  362. get {
  363. return IsTiled ();
  364. }
  365. set {
  366. SetTiled (value);
  367. }
  368. }
  369. /// <summary>
  370. /// Return texture attribute.
  371. /// </summary>
  372. public ResourceRef TextureAttr {
  373. get {
  374. return GetTextureAttr ();
  375. }
  376. }
  377. }
  378. }