You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
346 lines
14 KiB
346 lines
14 KiB
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
// This file is automatically generated. Changes to this file may be overwritten.
|
|
|
|
namespace Epic.OnlineServices.UI
|
|
{
|
|
public sealed partial class UIInterface : Handle
|
|
{
|
|
public UIInterface()
|
|
{
|
|
}
|
|
|
|
public UIInterface(System.IntPtr innerHandle) : base(innerHandle)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// DEPRECATED! Use <see cref="AcknowledgeeventidApiLatest" /> instead.
|
|
/// </summary>
|
|
public const int AcknowledgecorrelationidApiLatest = AcknowledgeeventidApiLatest;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="AcknowledgeEventId" /> API.
|
|
/// </summary>
|
|
public const int AcknowledgeeventidApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="AddNotifyDisplaySettingsUpdated" /> API.
|
|
/// </summary>
|
|
public const int AddnotifydisplaysettingsupdatedApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// ID representing a specific UI event.
|
|
/// </summary>
|
|
public const int EventidInvalid = 0;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="GetFriendsVisible" /> API.
|
|
/// </summary>
|
|
public const int GetfriendsvisibleApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="GetToggleFriendsKey" /> API.
|
|
/// </summary>
|
|
public const int GettogglefriendskeyApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="HideFriends" /> API.
|
|
/// </summary>
|
|
public const int HidefriendsApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="PrePresent" /> API.
|
|
/// </summary>
|
|
public const int PrepresentApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="ReportKeyEvent" /> API.
|
|
/// </summary>
|
|
public const int ReportkeyeventApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="SetDisplayPreference" /> API.
|
|
/// </summary>
|
|
public const int SetdisplaypreferenceApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="SetToggleFriendsKey" /> API.
|
|
/// </summary>
|
|
public const int SettogglefriendskeyApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// The most recent version of the <see cref="ShowFriends" /> API.
|
|
/// </summary>
|
|
public const int ShowfriendsApiLatest = 1;
|
|
|
|
/// <summary>
|
|
/// Lets the SDK know that the given UI event ID has been acknowledged and should be released.
|
|
/// <seealso cref="Presence.JoinGameAcceptedCallbackInfo" />
|
|
/// </summary>
|
|
/// <returns>
|
|
/// An <see cref="Result" /> is returned to indicate success or an error.
|
|
/// <see cref="Result.Success" /> is returned if the UI event ID has been acknowledged.
|
|
/// <see cref="Result.NotFound" /> is returned if the UI event ID does not exist.
|
|
/// </returns>
|
|
public Result AcknowledgeEventId(AcknowledgeEventIdOptions options)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<AcknowledgeEventIdOptionsInternal, AcknowledgeEventIdOptions>(ref optionsAddress, options);
|
|
|
|
var funcResult = Bindings.EOS_UI_AcknowledgeEventId(InnerHandle, optionsAddress);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Register to receive notifications when the overlay display settings are updated.
|
|
/// Newly registered handlers will always be called the next tick with the current state.
|
|
/// @note must call RemoveNotifyDisplaySettingsUpdated to remove the notification.
|
|
/// </summary>
|
|
/// <param name="options">Structure containing information about the request.</param>
|
|
/// <param name="clientData">Arbitrary data that is passed back to you in the NotificationFn.</param>
|
|
/// <param name="notificationFn">A callback that is fired when the overlay display settings are updated.</param>
|
|
/// <returns>
|
|
/// handle representing the registered callback
|
|
/// </returns>
|
|
public ulong AddNotifyDisplaySettingsUpdated(AddNotifyDisplaySettingsUpdatedOptions options, object clientData, OnDisplaySettingsUpdatedCallback notificationFn)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<AddNotifyDisplaySettingsUpdatedOptionsInternal, AddNotifyDisplaySettingsUpdatedOptions>(ref optionsAddress, options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var notificationFnInternal = new OnDisplaySettingsUpdatedCallbackInternal(OnDisplaySettingsUpdatedCallbackInternalImplementation);
|
|
Helper.AddCallback(ref clientDataAddress, clientData, notificationFn, notificationFnInternal);
|
|
|
|
var funcResult = Bindings.EOS_UI_AddNotifyDisplaySettingsUpdated(InnerHandle, optionsAddress, clientDataAddress, notificationFnInternal);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
Helper.TryAssignNotificationIdToCallback(clientDataAddress, funcResult);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the friends overlay visibility.
|
|
/// </summary>
|
|
/// <param name="options">Structure containing the Epic Online Services Account ID of the friends Social Overlay owner.</param>
|
|
/// <returns>
|
|
/// true If the overlay is visible.
|
|
/// </returns>
|
|
public bool GetFriendsVisible(GetFriendsVisibleOptions options)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<GetFriendsVisibleOptionsInternal, GetFriendsVisibleOptions>(ref optionsAddress, options);
|
|
|
|
var funcResult = Bindings.EOS_UI_GetFriendsVisible(InnerHandle, optionsAddress);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
bool funcResultReturn;
|
|
Helper.TryMarshalGet(funcResult, out funcResultReturn);
|
|
return funcResultReturn;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Returns the current notification location display preference.
|
|
/// </summary>
|
|
/// <returns>
|
|
/// The current notification location display preference.
|
|
/// </returns>
|
|
public NotificationLocation GetNotificationLocationPreference()
|
|
{
|
|
var funcResult = Bindings.EOS_UI_GetNotificationLocationPreference(InnerHandle);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Returns the current Toggle Friends Key. This key can be used by the user to toggle the friends
|
|
/// overlay when available. The default value represents `Shift + F3` as `((int32_t)<see cref="KeyCombination.Shift" /> | (int32_t)<see cref="KeyCombination.F3" />)`.
|
|
/// </summary>
|
|
/// <param name="options">Structure containing any options that are needed to retrieve the key.</param>
|
|
/// <returns>
|
|
/// A valid key combination which represent a single key with zero or more modifier keys.
|
|
/// <see cref="KeyCombination.None" /> will be returned if any error occurs.
|
|
/// </returns>
|
|
public KeyCombination GetToggleFriendsKey(GetToggleFriendsKeyOptions options)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<GetToggleFriendsKeyOptionsInternal, GetToggleFriendsKeyOptions>(ref optionsAddress, options);
|
|
|
|
var funcResult = Bindings.EOS_UI_GetToggleFriendsKey(InnerHandle, optionsAddress);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Hides the active Social Overlay.
|
|
/// </summary>
|
|
/// <param name="options">Structure containing the Epic Online Services Account ID of the browser to close.</param>
|
|
/// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate.</param>
|
|
/// <param name="completionDelegate">A callback that is fired when the request to hide the friends list has been processed, or on an error.</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> If the Social Overlay has been notified about the request.
|
|
/// <see cref="Result.InvalidParameters" /> If any of the options are incorrect.
|
|
/// <see cref="Result.NotConfigured" /> If the Social Overlay is not properly configured.
|
|
/// <see cref="Result.NoChange" /> If the Social Overlay is already hidden.
|
|
/// </returns>
|
|
public void HideFriends(HideFriendsOptions options, object clientData, OnHideFriendsCallback completionDelegate)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<HideFriendsOptionsInternal, HideFriendsOptions>(ref optionsAddress, options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnHideFriendsCallbackInternal(OnHideFriendsCallbackInternalImplementation);
|
|
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
Bindings.EOS_UI_HideFriends(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Determine if a key combination is valid. A key combinations must have a single key and at least one modifier.
|
|
/// The single key must be one of the following: F1 through F12, Space, Backspace, Escape, or Tab.
|
|
/// The modifier key must be one or more of the following: Shift, Control, or Alt.
|
|
/// </summary>
|
|
/// <param name="keyCombination">The key to test.</param>
|
|
/// <returns>
|
|
/// true if the provided key combination is valid.
|
|
/// </returns>
|
|
public bool IsValidKeyCombination(KeyCombination keyCombination)
|
|
{
|
|
var funcResult = Bindings.EOS_UI_IsValidKeyCombination(InnerHandle, keyCombination);
|
|
|
|
bool funcResultReturn;
|
|
Helper.TryMarshalGet(funcResult, out funcResultReturn);
|
|
return funcResultReturn;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Unregister from receiving notifications when the overlay display settings are updated.
|
|
/// </summary>
|
|
/// <param name="id">Handle representing the registered callback</param>
|
|
public void RemoveNotifyDisplaySettingsUpdated(ulong id)
|
|
{
|
|
Helper.TryRemoveCallbackByNotificationId(id);
|
|
|
|
Bindings.EOS_UI_RemoveNotifyDisplaySettingsUpdated(InnerHandle, id);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Define any preferences for any display settings.
|
|
/// </summary>
|
|
/// <param name="options">Structure containing any options that are needed to set</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> If the overlay has been notified about the request.
|
|
/// <see cref="Result.InvalidParameters" /> If any of the options are incorrect.
|
|
/// <see cref="Result.NotConfigured" /> If the overlay is not properly configured.
|
|
/// <see cref="Result.NoChange" /> If the preferences did not change.
|
|
/// </returns>
|
|
public Result SetDisplayPreference(SetDisplayPreferenceOptions options)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<SetDisplayPreferenceOptionsInternal, SetDisplayPreferenceOptions>(ref optionsAddress, options);
|
|
|
|
var funcResult = Bindings.EOS_UI_SetDisplayPreference(InnerHandle, optionsAddress);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Updates the current Toggle Friends Key. This key can be used by the user to toggle the friends
|
|
/// overlay when available. The default value represents `Shift + F3` as `((int32_t)<see cref="KeyCombination.Shift" /> | (int32_t)<see cref="KeyCombination.F3" />)`.
|
|
/// The provided key should satisfy <see cref="IsValidKeyCombination" />. The value <see cref="KeyCombination.None" /> is specially handled
|
|
/// by resetting the key binding to the system default.
|
|
/// <seealso cref="IsValidKeyCombination" />
|
|
/// </summary>
|
|
/// <param name="options">Structure containing the key combination to use.</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> If the overlay has been notified about the request.
|
|
/// <see cref="Result.InvalidParameters" /> If any of the options are incorrect.
|
|
/// <see cref="Result.NotConfigured" /> If the overlay is not properly configured.
|
|
/// <see cref="Result.NoChange" /> If the key combination did not change.
|
|
/// </returns>
|
|
public Result SetToggleFriendsKey(SetToggleFriendsKeyOptions options)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<SetToggleFriendsKeyOptionsInternal, SetToggleFriendsKeyOptions>(ref optionsAddress, options);
|
|
|
|
var funcResult = Bindings.EOS_UI_SetToggleFriendsKey(InnerHandle, optionsAddress);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
|
|
return funcResult;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Opens the Social Overlay with a request to show the friends list.
|
|
/// </summary>
|
|
/// <param name="options">Structure containing the Epic Online Services Account ID of the friends list to show.</param>
|
|
/// <param name="clientData">Arbitrary data that is passed back to you in the CompletionDelegate.</param>
|
|
/// <param name="completionDelegate">A callback that is fired when the request to show the friends list has been sent to the Social Overlay, or on an error.</param>
|
|
/// <returns>
|
|
/// <see cref="Result.Success" /> If the Social Overlay has been notified about the request.
|
|
/// <see cref="Result.InvalidParameters" /> If any of the options are incorrect.
|
|
/// <see cref="Result.NotConfigured" /> If the Social Overlay is not properly configured.
|
|
/// <see cref="Result.NoChange" /> If the Social Overlay is already visible.
|
|
/// </returns>
|
|
public void ShowFriends(ShowFriendsOptions options, object clientData, OnShowFriendsCallback completionDelegate)
|
|
{
|
|
var optionsAddress = System.IntPtr.Zero;
|
|
Helper.TryMarshalSet<ShowFriendsOptionsInternal, ShowFriendsOptions>(ref optionsAddress, options);
|
|
|
|
var clientDataAddress = System.IntPtr.Zero;
|
|
|
|
var completionDelegateInternal = new OnShowFriendsCallbackInternal(OnShowFriendsCallbackInternalImplementation);
|
|
Helper.AddCallback(ref clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
|
|
|
|
Bindings.EOS_UI_ShowFriends(InnerHandle, optionsAddress, clientDataAddress, completionDelegateInternal);
|
|
|
|
Helper.TryMarshalDispose(ref optionsAddress);
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnDisplaySettingsUpdatedCallbackInternal))]
|
|
internal static void OnDisplaySettingsUpdatedCallbackInternalImplementation(System.IntPtr data)
|
|
{
|
|
OnDisplaySettingsUpdatedCallback callback;
|
|
OnDisplaySettingsUpdatedCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback<OnDisplaySettingsUpdatedCallback, OnDisplaySettingsUpdatedCallbackInfoInternal, OnDisplaySettingsUpdatedCallbackInfo>(data, out callback, out callbackInfo))
|
|
{
|
|
callback(callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnHideFriendsCallbackInternal))]
|
|
internal static void OnHideFriendsCallbackInternalImplementation(System.IntPtr data)
|
|
{
|
|
OnHideFriendsCallback callback;
|
|
HideFriendsCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback<OnHideFriendsCallback, HideFriendsCallbackInfoInternal, HideFriendsCallbackInfo>(data, out callback, out callbackInfo))
|
|
{
|
|
callback(callbackInfo);
|
|
}
|
|
}
|
|
|
|
[MonoPInvokeCallback(typeof(OnShowFriendsCallbackInternal))]
|
|
internal static void OnShowFriendsCallbackInternalImplementation(System.IntPtr data)
|
|
{
|
|
OnShowFriendsCallback callback;
|
|
ShowFriendsCallbackInfo callbackInfo;
|
|
if (Helper.TryGetAndRemoveCallback<OnShowFriendsCallback, ShowFriendsCallbackInfoInternal, ShowFriendsCallbackInfo>(data, out callback, out callbackInfo))
|
|
{
|
|
callback(callbackInfo);
|
|
}
|
|
}
|
|
}
|
|
}
|