public MessageBoxData(global::SharpSDL.MessageBoxData _0) { __Instance = Marshal.AllocHGlobal(sizeof(global::SharpSDL.MessageBoxData.__Internal)); __ownsNativeInstance = true; NativeToManagedMap[__Instance] = this; *((global::SharpSDL.MessageBoxData.__Internal *)__Instance) = *((global::SharpSDL.MessageBoxData.__Internal *)_0.__Instance); }
/// <summary>Create a modal message box.</summary> /// <param name="messageboxdata">The SDL_MessageBoxData structure with title, text, etc.</param> /// <param name="buttonid">The pointer to which user id of hit button should be copied.</param> /// <returns> /// <para>-1 on error, otherwise 0 and buttonid contains user id of button</para> /// <para>hit or -1 if dialog was closed.</para> /// </returns> /// <remarks> /// <para>This function should be called on the thread that created the parent</para> /// <para>window, or on the main thread if the messagebox has no parent. It will</para> /// <para>block execution of that thread until the user clicks a button or</para> /// <para>closes the messagebox.</para> /// </remarks> public static int ShowMessageBox(global::SharpSDL.MessageBoxData messageboxdata, ref int buttonid) { var __arg0 = ReferenceEquals(messageboxdata, null) ? global::System.IntPtr.Zero : messageboxdata.__Instance; fixed(int *__buttonid1 = &buttonid) { var __arg1 = __buttonid1; var __ret = __Internal.ShowMessageBox(__arg0, __arg1); return(__ret); } }