// 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)
{
}
///
/// DEPRECATED! Use instead.
///
public const int AcknowledgecorrelationidApiLatest = AcknowledgeeventidApiLatest;
///
/// The most recent version of the API.
///
public const int AcknowledgeeventidApiLatest = 1;
///
/// The most recent version of the API.
///
public const int AddnotifydisplaysettingsupdatedApiLatest = 1;
///
/// ID representing a specific UI event.
///
public const int EventidInvalid = 0;
///
/// The most recent version of the API.
///
public const int GetfriendsvisibleApiLatest = 1;
///
/// The most recent version of the API.
///
public const int GettogglefriendskeyApiLatest = 1;
///
/// The most recent version of the API.
///
public const int HidefriendsApiLatest = 1;
///
/// The most recent version of the API.
///
public const int PrepresentApiLatest = 1;
///
/// The most recent version of the API.
///
public const int ReportkeyeventApiLatest = 1;
///
/// The most recent version of the API.
///
public const int SetdisplaypreferenceApiLatest = 1;
///
/// The most recent version of the API.
///
public const int SettogglefriendskeyApiLatest = 1;
///
/// The most recent version of the API.
///
public const int ShowfriendsApiLatest = 1;
///
/// Lets the SDK know that the given UI event ID has been acknowledged and should be released.
///
///
///
/// An is returned to indicate success or an error.
/// is returned if the UI event ID has been acknowledged.
/// is returned if the UI event ID does not exist.
///
public Result AcknowledgeEventId(AcknowledgeEventIdOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_UI_AcknowledgeEventId(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// 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.
///
/// Structure containing information about the request.
/// Arbitrary data that is passed back to you in the NotificationFn.
/// A callback that is fired when the overlay display settings are updated.
///
/// handle representing the registered callback
///
public ulong AddNotifyDisplaySettingsUpdated(AddNotifyDisplaySettingsUpdatedOptions options, object clientData, OnDisplaySettingsUpdatedCallback notificationFn)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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;
}
///
/// Gets the friends overlay visibility.
///
/// Structure containing the Epic Online Services Account ID of the friends Social Overlay owner.
///
/// true If the overlay is visible.
///
public bool GetFriendsVisible(GetFriendsVisibleOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_UI_GetFriendsVisible(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
bool funcResultReturn;
Helper.TryMarshalGet(funcResult, out funcResultReturn);
return funcResultReturn;
}
///
/// Returns the current notification location display preference.
///
///
/// The current notification location display preference.
///
public NotificationLocation GetNotificationLocationPreference()
{
var funcResult = Bindings.EOS_UI_GetNotificationLocationPreference(InnerHandle);
return funcResult;
}
///
/// 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) | (int32_t))`.
///
/// Structure containing any options that are needed to retrieve the key.
///
/// A valid key combination which represent a single key with zero or more modifier keys.
/// will be returned if any error occurs.
///
public KeyCombination GetToggleFriendsKey(GetToggleFriendsKeyOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_UI_GetToggleFriendsKey(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// Hides the active Social Overlay.
///
/// Structure containing the Epic Online Services Account ID of the browser to close.
/// Arbitrary data that is passed back to you in the CompletionDelegate.
/// A callback that is fired when the request to hide the friends list has been processed, or on an error.
///
/// If the Social Overlay has been notified about the request.
/// If any of the options are incorrect.
/// If the Social Overlay is not properly configured.
/// If the Social Overlay is already hidden.
///
public void HideFriends(HideFriendsOptions options, object clientData, OnHideFriendsCallback completionDelegate)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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);
}
///
/// 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.
///
/// The key to test.
///
/// true if the provided key combination is valid.
///
public bool IsValidKeyCombination(KeyCombination keyCombination)
{
var funcResult = Bindings.EOS_UI_IsValidKeyCombination(InnerHandle, keyCombination);
bool funcResultReturn;
Helper.TryMarshalGet(funcResult, out funcResultReturn);
return funcResultReturn;
}
///
/// Unregister from receiving notifications when the overlay display settings are updated.
///
/// Handle representing the registered callback
public void RemoveNotifyDisplaySettingsUpdated(ulong id)
{
Helper.TryRemoveCallbackByNotificationId(id);
Bindings.EOS_UI_RemoveNotifyDisplaySettingsUpdated(InnerHandle, id);
}
///
/// Define any preferences for any display settings.
///
/// Structure containing any options that are needed to set
///
/// If the overlay has been notified about the request.
/// If any of the options are incorrect.
/// If the overlay is not properly configured.
/// If the preferences did not change.
///
public Result SetDisplayPreference(SetDisplayPreferenceOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_UI_SetDisplayPreference(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// 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) | (int32_t))`.
/// The provided key should satisfy . The value is specially handled
/// by resetting the key binding to the system default.
///
///
/// Structure containing the key combination to use.
///
/// If the overlay has been notified about the request.
/// If any of the options are incorrect.
/// If the overlay is not properly configured.
/// If the key combination did not change.
///
public Result SetToggleFriendsKey(SetToggleFriendsKeyOptions options)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(ref optionsAddress, options);
var funcResult = Bindings.EOS_UI_SetToggleFriendsKey(InnerHandle, optionsAddress);
Helper.TryMarshalDispose(ref optionsAddress);
return funcResult;
}
///
/// Opens the Social Overlay with a request to show the friends list.
///
/// Structure containing the Epic Online Services Account ID of the friends list to show.
/// Arbitrary data that is passed back to you in the 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.
///
/// If the Social Overlay has been notified about the request.
/// If any of the options are incorrect.
/// If the Social Overlay is not properly configured.
/// If the Social Overlay is already visible.
///
public void ShowFriends(ShowFriendsOptions options, object clientData, OnShowFriendsCallback completionDelegate)
{
var optionsAddress = System.IntPtr.Zero;
Helper.TryMarshalSet(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(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnHideFriendsCallbackInternal))]
internal static void OnHideFriendsCallbackInternalImplementation(System.IntPtr data)
{
OnHideFriendsCallback callback;
HideFriendsCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
[MonoPInvokeCallback(typeof(OnShowFriendsCallbackInternal))]
internal static void OnShowFriendsCallbackInternalImplementation(System.IntPtr data)
{
OnShowFriendsCallback callback;
ShowFriendsCallbackInfo callbackInfo;
if (Helper.TryGetAndRemoveCallback(data, out callback, out callbackInfo))
{
callback(callbackInfo);
}
}
}
}