Application.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. // WARNING - AUTOGENERATED - DO NOT EDIT
  2. //
  3. // Generated using `sharpie urho`
  4. //
  5. // Application.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. /// Base class for creating applications which initialize the Urho3D engine and run a main loop until exited.
  21. /// </summary>
  22. public partial class Application : UrhoObject
  23. {
  24. unsafe partial void OnApplicationCreated ();
  25. [Preserve]
  26. public Application (IntPtr handle) : base (handle)
  27. {
  28. OnApplicationCreated ();
  29. }
  30. [Preserve]
  31. protected Application (UrhoObjectFlag emptyFlag) : base (emptyFlag)
  32. {
  33. OnApplicationCreated ();
  34. }
  35. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  36. internal static extern int Application_GetType (IntPtr handle);
  37. private StringHash UrhoGetType ()
  38. {
  39. Runtime.ValidateRefCounted (this);
  40. return new StringHash (Application_GetType (handle));
  41. }
  42. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  43. internal static extern IntPtr Application_GetTypeName (IntPtr handle);
  44. private string GetTypeName ()
  45. {
  46. Runtime.ValidateRefCounted (this);
  47. return Marshal.PtrToStringAnsi (Application_GetTypeName (handle));
  48. }
  49. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  50. internal static extern int Application_GetTypeStatic ();
  51. private static StringHash GetTypeStatic ()
  52. {
  53. Runtime.Validate (typeof(Application));
  54. return new StringHash (Application_GetTypeStatic ());
  55. }
  56. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  57. internal static extern IntPtr Application_GetTypeNameStatic ();
  58. private static string GetTypeNameStatic ()
  59. {
  60. Runtime.Validate (typeof(Application));
  61. return Marshal.PtrToStringAnsi (Application_GetTypeNameStatic ());
  62. }
  63. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  64. internal static extern int Application_Run (IntPtr handle);
  65. /// <summary>
  66. /// Initialize the engine and run the main loop, then return the application exit code. Catch out-of-memory exceptions while running.
  67. /// </summary>
  68. public int Run ()
  69. {
  70. return Application_Run (handle);
  71. }
  72. [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
  73. internal static extern void Application_ErrorExit (IntPtr handle, string message);
  74. /// <summary>
  75. /// Show an error message (last log message if empty), terminate the main loop, and set failure exit code.
  76. /// </summary>
  77. public void ErrorExit (string message = "")
  78. {
  79. Runtime.ValidateRefCounted (this);
  80. Application_ErrorExit (handle, message);
  81. }
  82. public override StringHash Type {
  83. get {
  84. return UrhoGetType ();
  85. }
  86. }
  87. public override string TypeName {
  88. get {
  89. return GetTypeName ();
  90. }
  91. }
  92. [Preserve]
  93. public static StringHash TypeStatic {
  94. get {
  95. return GetTypeStatic ();
  96. }
  97. }
  98. public static string TypeNameStatic {
  99. get {
  100. return GetTypeNameStatic ();
  101. }
  102. }
  103. }
  104. }