| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449 |
- // WARNING - AUTOGENERATED - DO NOT EDIT
- //
- // Generated using `sharpie urho`
- //
- // TileMapLayer2D.cs
- //
- // Copyright 2015 Xamarin Inc. All rights reserved.
- using System;
- using System.Runtime.InteropServices;
- using System.Collections.Generic;
- using Urho.Urho2D;
- using Urho.Gui;
- using Urho.Resources;
- using Urho.IO;
- using Urho.Navigation;
- using Urho.Network;
- namespace Urho.Urho2D
- {
- /// <summary>
- /// Tile map component.
- /// </summary>
- public unsafe partial class TileMapLayer2D : Component
- {
- unsafe partial void OnTileMapLayer2DCreated ();
- [Preserve]
- public TileMapLayer2D (IntPtr handle) : base (handle)
- {
- OnTileMapLayer2DCreated ();
- }
- [Preserve]
- protected TileMapLayer2D (UrhoObjectFlag emptyFlag) : base (emptyFlag)
- {
- OnTileMapLayer2DCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int TileMapLayer2D_GetType (IntPtr handle);
- private StringHash UrhoGetType ()
- {
- Runtime.ValidateRefCounted (this);
- return new StringHash (TileMapLayer2D_GetType (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TileMapLayer2D_GetTypeName (IntPtr handle);
- private string GetTypeName ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (TileMapLayer2D_GetTypeName (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int TileMapLayer2D_GetTypeStatic ();
- private static StringHash GetTypeStatic ()
- {
- Runtime.Validate (typeof(TileMapLayer2D));
- return new StringHash (TileMapLayer2D_GetTypeStatic ());
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TileMapLayer2D_GetTypeNameStatic ();
- private static string GetTypeNameStatic ()
- {
- Runtime.Validate (typeof(TileMapLayer2D));
- return Marshal.PtrToStringAnsi (TileMapLayer2D_GetTypeNameStatic ());
- }
- [Preserve]
- public TileMapLayer2D () : this (Application.CurrentContext)
- {
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TileMapLayer2D_TileMapLayer2D (IntPtr context);
- [Preserve]
- public TileMapLayer2D (Context context) : base (UrhoObjectFlag.Empty)
- {
- Runtime.Validate (typeof(TileMapLayer2D));
- handle = TileMapLayer2D_TileMapLayer2D ((object)context == null ? IntPtr.Zero : context.Handle);
- Runtime.RegisterObject (this);
- OnTileMapLayer2DCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void TileMapLayer2D_RegisterObject (IntPtr context);
- /// <summary>
- /// Register object factory.
- /// </summary>
- public new static void RegisterObject (Context context)
- {
- Runtime.Validate (typeof(TileMapLayer2D));
- TileMapLayer2D_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void TileMapLayer2D_DrawDebugGeometry (IntPtr handle, IntPtr debug, bool depthTest);
- /// <summary>
- /// Add debug geometry to the debug renderer.
- /// </summary>
- public override void DrawDebugGeometry (DebugRenderer debug, bool depthTest)
- {
- Runtime.ValidateRefCounted (this);
- TileMapLayer2D_DrawDebugGeometry (handle, (object)debug == null ? IntPtr.Zero : debug.Handle, depthTest);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void TileMapLayer2D_Initialize (IntPtr handle, IntPtr tileMap, IntPtr tmxLayer);
- /// <summary>
- /// Initialize with tile map and tmx layer.
- /// </summary>
- public void Initialize (TileMap2D tileMap, TmxLayer2D tmxLayer)
- {
- Runtime.ValidateRefCounted (this);
- TileMapLayer2D_Initialize (handle, (object)tileMap == null ? IntPtr.Zero : tileMap.Handle, (object)tmxLayer == null ? IntPtr.Zero : tmxLayer.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void TileMapLayer2D_SetDrawOrder (IntPtr handle, int drawOrder);
- /// <summary>
- /// Set draw order
- /// </summary>
- private void SetDrawOrder (int drawOrder)
- {
- Runtime.ValidateRefCounted (this);
- TileMapLayer2D_SetDrawOrder (handle, drawOrder);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void TileMapLayer2D_SetVisible (IntPtr handle, bool visible);
- /// <summary>
- /// Set visible.
- /// </summary>
- private void SetVisible (bool visible)
- {
- Runtime.ValidateRefCounted (this);
- TileMapLayer2D_SetVisible (handle, visible);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TileMapLayer2D_GetTileMap (IntPtr handle);
- /// <summary>
- /// Return tile map.
- /// </summary>
- private TileMap2D GetTileMap ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<TileMap2D> (TileMapLayer2D_GetTileMap (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TileMapLayer2D_GetTmxLayer (IntPtr handle);
- /// <summary>
- /// Return tmx layer.
- /// </summary>
- private TmxLayer2D GetTmxLayer ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupRefCounted<TmxLayer2D> (TileMapLayer2D_GetTmxLayer (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int TileMapLayer2D_GetDrawOrder (IntPtr handle);
- /// <summary>
- /// Return draw order.
- /// </summary>
- private int GetDrawOrder ()
- {
- Runtime.ValidateRefCounted (this);
- return TileMapLayer2D_GetDrawOrder (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool TileMapLayer2D_IsVisible (IntPtr handle);
- /// <summary>
- /// Return visible.
- /// </summary>
- private bool IsVisible ()
- {
- Runtime.ValidateRefCounted (this);
- return TileMapLayer2D_IsVisible (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool TileMapLayer2D_HasProperty (IntPtr handle, string name);
- /// <summary>
- /// Return has property
- /// </summary>
- public bool HasProperty (string name)
- {
- Runtime.ValidateRefCounted (this);
- return TileMapLayer2D_HasProperty (handle, name);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TileMapLayer2D_GetProperty (IntPtr handle, string name);
- /// <summary>
- /// Return property.
- /// </summary>
- public string GetProperty (string name)
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (TileMapLayer2D_GetProperty (handle, name));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern TileMapLayerType2D TileMapLayer2D_GetLayerType (IntPtr handle);
- /// <summary>
- /// Return layer type.
- /// </summary>
- private TileMapLayerType2D GetLayerType ()
- {
- Runtime.ValidateRefCounted (this);
- return TileMapLayer2D_GetLayerType (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int TileMapLayer2D_GetWidth (IntPtr handle);
- /// <summary>
- /// Return width (for tile layer only).
- /// </summary>
- private int GetWidth ()
- {
- Runtime.ValidateRefCounted (this);
- return TileMapLayer2D_GetWidth (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int TileMapLayer2D_GetHeight (IntPtr handle);
- /// <summary>
- /// Return height (for tile layer only).
- /// </summary>
- private int GetHeight ()
- {
- Runtime.ValidateRefCounted (this);
- return TileMapLayer2D_GetHeight (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TileMapLayer2D_GetTileNode (IntPtr handle, int x, int y);
- /// <summary>
- /// Return tile node (for tile layer only).
- /// </summary>
- public Node GetTileNode (int x, int y)
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Node> (TileMapLayer2D_GetTileNode (handle, x, y));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TileMapLayer2D_GetTile (IntPtr handle, int x, int y);
- /// <summary>
- /// Return tile (for tile layer only).
- /// </summary>
- public Tile2D GetTile (int x, int y)
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupRefCounted<Tile2D> (TileMapLayer2D_GetTile (handle, x, y));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint TileMapLayer2D_GetNumObjects (IntPtr handle);
- /// <summary>
- /// Return number of tile map objects (for object group only).
- /// </summary>
- private uint GetNumObjects ()
- {
- Runtime.ValidateRefCounted (this);
- return TileMapLayer2D_GetNumObjects (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TileMapLayer2D_GetObject (IntPtr handle, uint index);
- /// <summary>
- /// Return tile map object (for object group only).
- /// </summary>
- public TileMapObject2D GetObject (uint index)
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupRefCounted<TileMapObject2D> (TileMapLayer2D_GetObject (handle, index));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TileMapLayer2D_GetObjectNode (IntPtr handle, uint index);
- /// <summary>
- /// Return object node (for object group only).
- /// </summary>
- public Node GetObjectNode (uint index)
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Node> (TileMapLayer2D_GetObjectNode (handle, index));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr TileMapLayer2D_GetImageNode (IntPtr handle);
- /// <summary>
- /// Return image node (for image layer only).
- /// </summary>
- private Node GetImageNode ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Node> (TileMapLayer2D_GetImageNode (handle));
- }
- public override StringHash Type {
- get {
- return UrhoGetType ();
- }
- }
- public override string TypeName {
- get {
- return GetTypeName ();
- }
- }
- [Preserve]
- public new static StringHash TypeStatic {
- get {
- return GetTypeStatic ();
- }
- }
- public new static string TypeNameStatic {
- get {
- return GetTypeNameStatic ();
- }
- }
- /// <summary>
- /// Return draw order.
- /// Or
- /// Set draw order
- /// </summary>
- public int DrawOrder {
- get {
- return GetDrawOrder ();
- }
- set {
- SetDrawOrder (value);
- }
- }
- /// <summary>
- /// Return visible.
- /// Or
- /// Set visible.
- /// </summary>
- public bool Visible {
- get {
- return IsVisible ();
- }
- set {
- SetVisible (value);
- }
- }
- /// <summary>
- /// Return tile map.
- /// </summary>
- public TileMap2D TileMap {
- get {
- return GetTileMap ();
- }
- }
- /// <summary>
- /// Return tmx layer.
- /// </summary>
- public TmxLayer2D TmxLayer {
- get {
- return GetTmxLayer ();
- }
- }
- /// <summary>
- /// Return layer type.
- /// </summary>
- public TileMapLayerType2D LayerType {
- get {
- return GetLayerType ();
- }
- }
- /// <summary>
- /// Return width (for tile layer only).
- /// </summary>
- public int Width {
- get {
- return GetWidth ();
- }
- }
- /// <summary>
- /// Return height (for tile layer only).
- /// </summary>
- public int Height {
- get {
- return GetHeight ();
- }
- }
- /// <summary>
- /// Return number of tile map objects (for object group only).
- /// </summary>
- public uint NumObjects {
- get {
- return GetNumObjects ();
- }
- }
- /// <summary>
- /// Return image node (for image layer only).
- /// </summary>
- public Node ImageNode {
- get {
- return GetImageNode ();
- }
- }
- }
- }
|