Compare commits
7 Commits
387eb90576
...
ed4d5a5397
| Author | SHA1 | Date | |
|---|---|---|---|
| ed4d5a5397 | |||
| 1b9c9436bc | |||
| ec94cda27b | |||
| 19852273b7 | |||
| 62d99b18cd | |||
| 3a04326bfd | |||
| ce5cfa6b21 |
@@ -25,11 +25,11 @@ namespace FlaxEditor.GUI.Docking
|
||||
|
||||
private Rectangle _rLeft, _rRight, _rBottom, _rUpper, _rCenter;
|
||||
|
||||
private DockHintWindow(FloatWindowDockPanel toMove, bool lateDragStart)
|
||||
private DockHintWindow(FloatWindowDockPanel toMove, bool draggingTab)
|
||||
{
|
||||
_toMove = toMove;
|
||||
_toSet = DockState.Float;
|
||||
var window = _toMove?.Window.Window ?? Editor.Instance.Windows.MainWindow;
|
||||
var window = toMove.Window.Window;
|
||||
|
||||
// Remove focus from drag target
|
||||
//_toMove.Focus();
|
||||
@@ -47,11 +47,7 @@ namespace FlaxEditor.GUI.Docking
|
||||
window.Restore();
|
||||
window.Position = Platform.MousePosition - mousePos * window.Size / previousSize;
|
||||
}
|
||||
|
||||
// Calculate dragging offset and move window to the destination position
|
||||
var mouseClientPosition = Platform.MousePosition;
|
||||
CalculateDragOffset(mouseClientPosition);
|
||||
|
||||
|
||||
// If the _toMove window was not focused when initializing this window, the result vector only contains zeros
|
||||
// and to prevent a failure, we need to perform an update for the drag offset at later time which will be done in the OnMouseMove event handler.
|
||||
//if (mouseScreenPosition != Float2.Zero)
|
||||
@@ -62,7 +58,7 @@ namespace FlaxEditor.GUI.Docking
|
||||
|
||||
|
||||
// Get initial size
|
||||
//_defaultWindowSize = window.Size;
|
||||
_defaultWindowSize = window.Size;
|
||||
|
||||
// Init proxy window
|
||||
/*Proxy.Init(ref _defaultWindowSize);
|
||||
@@ -72,7 +68,7 @@ namespace FlaxEditor.GUI.Docking
|
||||
|
||||
//FlaxEngine.Input.MouseMove += OnMouseMove;
|
||||
FlaxEngine.Scripting.Update += OnUpdate;
|
||||
window.MouseUp += OnMouseUp;
|
||||
_toMove.Window.Window.MouseUp += OnMouseUp;
|
||||
/*
|
||||
Proxy.Window.MouseUp += OnMouseUp;
|
||||
Proxy.Window.MouseMove += OnMouseMove;
|
||||
@@ -93,18 +89,21 @@ namespace FlaxEditor.GUI.Docking
|
||||
// Hide base window
|
||||
//window.Hide();
|
||||
|
||||
window.Show();
|
||||
// window.Show();
|
||||
|
||||
if (lateDragStart)
|
||||
if (draggingTab)
|
||||
{
|
||||
// The window needs some time to be fully ready for dragging
|
||||
//_lateDragStartTimer = 1.5f;
|
||||
window.StartDragging(_dragOffset);
|
||||
_dragOffset = new Float2(window.Size.X / 2, 10.0f);
|
||||
|
||||
window.StartDragging(_dragOffset, toMove.MasterPanel?.RootWindow.Window ?? Editor.Instance.Windows.MainWindow);
|
||||
}
|
||||
else
|
||||
window.StartDragging(_dragOffset);
|
||||
|
||||
Dispose();
|
||||
{
|
||||
var mouseClientPosition = Platform.MousePosition;
|
||||
CalculateDragOffset(mouseClientPosition);
|
||||
|
||||
window.StartDragging(_dragOffset, window);
|
||||
}
|
||||
|
||||
//window.Show();
|
||||
//window.BringToFront();
|
||||
@@ -113,8 +112,8 @@ namespace FlaxEditor.GUI.Docking
|
||||
|
||||
// Perform layout again
|
||||
//windowGUI.PerformLayout();
|
||||
|
||||
|
||||
|
||||
|
||||
// Start tracking mouse
|
||||
//Proxy.Window.StartTrackingMouse(false);
|
||||
}
|
||||
@@ -143,9 +142,9 @@ namespace FlaxEditor.GUI.Docking
|
||||
RemoveDockHints();
|
||||
|
||||
//FlaxEngine.Input.MouseMove -= OnMouseMove;
|
||||
var window = _toMove?.Window?.Window ?? Editor.Instance.Windows.MainWindow;
|
||||
FlaxEngine.Scripting.Update -= OnUpdate;
|
||||
window.MouseUp -= OnMouseUp;
|
||||
if (_toMove?.Window?.Window)
|
||||
_toMove.Window.Window.MouseUp -= OnMouseUp;
|
||||
|
||||
if (_toMove == null)
|
||||
return;
|
||||
@@ -155,6 +154,7 @@ namespace FlaxEditor.GUI.Docking
|
||||
// Check if window won't be docked
|
||||
if (_toSet == DockState.Float)
|
||||
{
|
||||
var window = _toMove.Window?.Window;
|
||||
if (window == null)
|
||||
return;
|
||||
var mouse = Platform.MousePosition;
|
||||
@@ -244,7 +244,7 @@ namespace FlaxEditor.GUI.Docking
|
||||
window.Window.Position = mouse - new Float2(8, 8);*/
|
||||
|
||||
// Get floating panel
|
||||
var floatingPanelToMove = window?.GetChild(0) as FloatWindowDockPanel;
|
||||
var floatingPanelToMove = window.GetChild(0) as FloatWindowDockPanel;
|
||||
|
||||
return new DockHintWindow(floatingPanelToMove, true);
|
||||
}
|
||||
@@ -284,7 +284,7 @@ namespace FlaxEditor.GUI.Docking
|
||||
|
||||
private void CalculateDragOffset(Float2 mouseScreenPosition)
|
||||
{
|
||||
var baseWinPos = _toMove?.Window.Window.Position ?? Editor.Instance.Windows.MainWindow.Position;
|
||||
var baseWinPos = _toMove.Window.Window.Position;
|
||||
_dragOffset = mouseScreenPosition - baseWinPos;
|
||||
|
||||
Editor.Log($"_dragOffset: {_dragOffset}, mouse: {mouseScreenPosition}, basewinpos: {baseWinPos}");
|
||||
@@ -336,16 +336,13 @@ namespace FlaxEditor.GUI.Docking
|
||||
// Cache mouse position
|
||||
_mouse = Platform.MousePosition;
|
||||
|
||||
if (_toMove == null)
|
||||
return;
|
||||
|
||||
// Check intersection with any dock panel
|
||||
var uiMouse = _mouse;
|
||||
var dockPanel = _toMove.MasterPanel.HitTest(ref uiMouse, _toMove);
|
||||
|
||||
if (dockPanel != _toDock)
|
||||
{
|
||||
//Editor.Log($"UpdateRects: {_mouse}, panel: {dockPanel?.RootWindow?.Window?.Title}");
|
||||
Editor.Log($"UpdateRects: {_mouse}, panel: {dockPanel?.RootWindow?.Window?.Title}");
|
||||
|
||||
_toDock?.RootWindow.Window.RemoveDockHints();
|
||||
RemoveDockHints();
|
||||
@@ -425,8 +422,8 @@ namespace FlaxEditor.GUI.Docking
|
||||
hoveredSizeOverride = new Float2(size.X, size.Y);
|
||||
}
|
||||
|
||||
if (toSet != DockState.Float)
|
||||
Editor.Log($"docking: {toSet}");
|
||||
//if (toSet != DockState.Float)
|
||||
|
||||
|
||||
_toSet = toSet;
|
||||
}
|
||||
@@ -434,6 +431,8 @@ namespace FlaxEditor.GUI.Docking
|
||||
{
|
||||
_toSet = DockState.Float;
|
||||
}
|
||||
|
||||
Editor.Log($"docking: {_toSet}, pos: {_mouse}");
|
||||
|
||||
// Calculate proxy/dock/window rectangles
|
||||
if (_toDock == null)
|
||||
@@ -524,15 +523,10 @@ namespace FlaxEditor.GUI.Docking
|
||||
private void OnUpdate()
|
||||
{
|
||||
//Editor.Log("OnUpdate");
|
||||
if (_lateDragStartTimer > 0)
|
||||
{
|
||||
_lateDragStartTimer -= Time.UnscaledDeltaTime;
|
||||
if (_lateDragStartTimer <= 0)
|
||||
_toMove.Window.Window.StartDragging(_dragOffset);
|
||||
}
|
||||
var mousePos = Platform.MousePosition;
|
||||
if (_mouse != mousePos)
|
||||
{
|
||||
Editor.Log($"mouse pos {_mouse} -> {mousePos}");
|
||||
OnMouseMove(mousePos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -280,49 +280,16 @@ namespace FlaxEditor.GUI.Docking
|
||||
_selectedTab = tab;
|
||||
if (_selectedTab != null)
|
||||
{
|
||||
//_selectedTab.UnlockChildrenRecursive();
|
||||
_selectedTab.UnlockChildrenRecursive();
|
||||
_selectedTab.Parent = proxy;
|
||||
//if (autoFocus)
|
||||
// _selectedTab.Focus();
|
||||
if (autoFocus)
|
||||
_selectedTab.Focus();
|
||||
}
|
||||
//OnSelectedTabChanged();
|
||||
OnSelectedTabChanged();
|
||||
}
|
||||
else if (autoFocus && _selectedTab != null && !_selectedTab.ContainsFocus)
|
||||
{
|
||||
//_selectedTab.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
public void SelectTab2(DockWindow tab, bool autoFocus = true)
|
||||
{
|
||||
// Check if tab will change
|
||||
if (_selectedTab != tab)
|
||||
{
|
||||
// Change
|
||||
ContainerControl proxy;
|
||||
if (_selectedTab != null)
|
||||
{
|
||||
proxy = _selectedTab.Parent;
|
||||
_selectedTab.Parent = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
CreateTabsProxy();
|
||||
proxy = _tabsProxy;
|
||||
}
|
||||
_selectedTab = tab;
|
||||
if (_selectedTab != null)
|
||||
{
|
||||
//_selectedTab.UnlockChildrenRecursive();
|
||||
_selectedTab.Parent = proxy;
|
||||
//if (autoFocus)
|
||||
// _selectedTab.Focus();
|
||||
}
|
||||
//OnSelectedTabChanged();
|
||||
}
|
||||
else if (autoFocus && _selectedTab != null && !_selectedTab.ContainsFocus)
|
||||
{
|
||||
//_selectedTab.Focus();
|
||||
_selectedTab.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -634,7 +601,7 @@ namespace FlaxEditor.GUI.Docking
|
||||
_tabs.Add(window);
|
||||
window.ParentDockPanel = this;
|
||||
if (autoSelect)
|
||||
SelectTab2(window);
|
||||
SelectTab(window);
|
||||
}
|
||||
|
||||
private void CreateTabsProxy()
|
||||
|
||||
@@ -185,21 +185,19 @@ namespace FlaxEditor.GUI.Docking
|
||||
{
|
||||
Undock();
|
||||
|
||||
|
||||
// Create window
|
||||
var winSize = size.LengthSquared > 4 ? size : DefaultSize;
|
||||
var window = FloatWindowDockPanel.CreateFloatWindow(_masterPanel.Root, location, winSize, position, _title);
|
||||
var windowGUI = window.GUI;
|
||||
|
||||
|
||||
// Create dock panel for the window
|
||||
var dockPanel = new FloatWindowDockPanel(_masterPanel, windowGUI);
|
||||
dockPanel.DockWindowInternal(DockState.DockFill, this, true);
|
||||
/*
|
||||
dockPanel.DockWindowInternal(DockState.DockFill, this);
|
||||
|
||||
// Perform layout
|
||||
Visible = true;
|
||||
windowGUI.UnlockChildrenRecursive();
|
||||
windowGUI.PerformLayout();
|
||||
*/
|
||||
|
||||
// Show
|
||||
/*FlaxEngine.Scripting.InvokeOnUpdate(() =>
|
||||
@@ -467,10 +465,10 @@ namespace FlaxEditor.GUI.Docking
|
||||
/// <inheritdoc />
|
||||
public override void Focus()
|
||||
{
|
||||
/*base.Focus();
|
||||
base.Focus();
|
||||
|
||||
SelectTab();
|
||||
BringToFront();*/
|
||||
BringToFront();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -51,9 +51,9 @@ namespace FlaxEditor.GUI.Docking
|
||||
if (_window == null)
|
||||
return;
|
||||
|
||||
_window.Window.StartDragging(Float2.Zero);
|
||||
// Create docking hint window
|
||||
//DockHintWindow.Create(this);
|
||||
DockHintWindow.Create(this);
|
||||
//_window.Window.StartDragging(Float2.Zero);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -16,6 +16,7 @@ API_CLASS(Static) class FLAXENGINE_API Time
|
||||
friend class Engine;
|
||||
friend class TimeService;
|
||||
friend class PhysicsSettings;
|
||||
friend class SDLWindow;
|
||||
|
||||
public:
|
||||
/// <summary>
|
||||
|
||||
@@ -741,7 +741,8 @@ public:
|
||||
/// Start dragging the window.
|
||||
/// </summary>
|
||||
/// <param name="offset">The position offset for drag from top-left corner.</param>
|
||||
API_FUNCTION() virtual void StartDragging(const Float2& offset)
|
||||
/// <param name="dragSourceWindow">The source window where the dragging is started from. For attached tabs, this is the parent window</param>
|
||||
API_FUNCTION() virtual void StartDragging(const Float2& offset, Window* dragSourceWindow)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
|
||||
|
||||
#include "Engine/Engine/Engine.h"
|
||||
#if PLATFORM_SDL
|
||||
|
||||
#include "SDLInput.h"
|
||||
@@ -496,14 +497,17 @@ bool SDLInput::HandleEvent(SDLWindow* window, SDL_Event& event)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
case SDL_EVENT_DROP_POSITION:
|
||||
/*case SDL_EVENT_DROP_POSITION:
|
||||
{
|
||||
// We are not receiving mouse motion events during drag-and-drop
|
||||
auto dpiScale = window->GetDpiScale();
|
||||
const Float2 mousePos = window->ClientToScreen({ event.drop.x * dpiScale, event.drop.y * dpiScale});
|
||||
//const Float2 mousePos(event.drop.x * dpiScale, event.drop.y * dpiScale);// = window->ClientToScreen({ event.drop.x * dpiScale, event.drop.y * dpiScale});
|
||||
Float2 mousePos = window->ClientToScreen({ event.drop.x * dpiScale, event.drop.y * dpiScale});
|
||||
if (window != Engine::MainWindow)
|
||||
mousePos = window->GetPosition() - mousePos;
|
||||
Input::Mouse->OnMouseMove(mousePos, window);
|
||||
return true;
|
||||
}
|
||||
}*/
|
||||
case SDL_EVENT_WINDOW_MOUSE_LEAVE:
|
||||
{
|
||||
Input::Mouse->OnMouseLeave(window);
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include "Engine/Engine/Time.h"
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
#include "Engine/Platform/Base/DragDropHelper.h"
|
||||
#include "Engine/Platform/Unix/UnixFile.h"
|
||||
|
||||
@@ -497,8 +499,8 @@ void WaylandDataSource_Cancelled(void* data, wl_data_source *source)
|
||||
wl_data_source_destroy(source);
|
||||
|
||||
// The mouse up event was ignored earlier, release the button now
|
||||
SDLWindow* window = ((LinuxDropTextData*)inputData)->Window;
|
||||
Input::Mouse->OnMouseUp(Platform::GetMousePosition(), MouseButton::Left, window);
|
||||
//SDLWindow* window = ((LinuxDropTextData*)inputData)->Window;
|
||||
//Input::Mouse->OnMouseUp(Platform::GetMousePosition(), MouseButton::Left, window);
|
||||
|
||||
/*if (DragTargetWindow != nullptr)
|
||||
{
|
||||
@@ -515,7 +517,7 @@ void WaylandDataSource_DnDDropPerformed(void *data,
|
||||
{
|
||||
// The destination is being asked to begin DnD, asking confirmation with ASK actionh
|
||||
//SDLWindow* window = static_cast<SDLWindow*>(data);
|
||||
//LOG(Info, "WaylandDataSource_DnDDropPerformed");
|
||||
LOG(Info, "WaylandDataSource_DnDDropPerformed");
|
||||
}
|
||||
|
||||
void WaylandDataSource_DnDFinished(void *data,
|
||||
@@ -531,8 +533,8 @@ void WaylandDataSource_DnDFinished(void *data,
|
||||
wl_data_source_destroy(wl_data_source);
|
||||
|
||||
// The mouse up event was ignored earlier, release the button now
|
||||
SDLWindow* window = ((LinuxDropTextData*)inputData)->Window;
|
||||
Input::Mouse->OnMouseUp(Platform::GetMousePosition(), MouseButton::Left, window);
|
||||
//SDLWindow* window = ((LinuxDropTextData*)inputData)->Window;
|
||||
//Input::Mouse->OnMouseUp(Platform::GetMousePosition(), MouseButton::Left, window);
|
||||
|
||||
/*if (DragTargetWindow != nullptr)
|
||||
{
|
||||
@@ -576,7 +578,8 @@ public:
|
||||
int64 ExitFlag = 0;
|
||||
StringView data;
|
||||
SDLWindow* window;
|
||||
SDLWindow* mainwindow;
|
||||
SDLWindow* dragSourceWindow;
|
||||
Float2 dragOffset = Float2::Zero;
|
||||
int64 dragOver = 0;
|
||||
int64 waitFlag = 0;
|
||||
|
||||
@@ -614,7 +617,7 @@ public:
|
||||
/*auto */dataDevice = wl_data_device_manager_get_data_device(wrappedManager, WaylandSeat);
|
||||
wl_data_device_add_listener(dataDevice, &WaylandDataDeviceListener, nullptr);
|
||||
wl_display_roundtrip(wrappedDisplay);
|
||||
wl_data_device_set_user_data(dataDevice, dragWindow ? mainwindow : window);
|
||||
wl_data_device_set_user_data(dataDevice, dragWindow ? dragSourceWindow : window);
|
||||
wrappedDataDevice = (wl_data_device*)wl_proxy_create_wrapper(dataDevice);
|
||||
wl_proxy_set_queue((wl_proxy*)wrappedDataDevice, WaylandQueue);
|
||||
}
|
||||
@@ -641,7 +644,7 @@ public:
|
||||
textData.Window = window;
|
||||
textData.dragOver = &dragOver;
|
||||
auto _window = window->GetSDLWindow();
|
||||
auto _mainwindow = mainwindow->GetSDLWindow();
|
||||
auto _mainwindow = dragSourceWindow->GetSDLWindow();
|
||||
//if (!window->IsVisible())
|
||||
// _window = mainwindow->GetSDLWindow();
|
||||
//wl_data_source_set_user_data(wrappedDataSource, &textData);
|
||||
@@ -677,8 +680,7 @@ public:
|
||||
wl_proxy_set_queue((wl_proxy*)wrappedToplevel, WaylandQueue);
|
||||
toplevelDrag = xdg_toplevel_drag_manager_v1_get_xdg_toplevel_drag(DragManager, dataSource);
|
||||
|
||||
Float2 offset(100, 240);
|
||||
Float2 scaledOffset = offset / window->GetDpiScale();
|
||||
Float2 scaledOffset = dragOffset / window->GetDpiScale();
|
||||
//xdg_toplevel_drag_v1_attach(toplevelDrag, toplevel, (int32)scaledOffset.X, (int32)scaledOffset.Y);
|
||||
|
||||
xdg_toplevel_drag_v1_attach(toplevelDrag, wrappedToplevel, (int32)scaledOffset.X, (int32)scaledOffset.Y);
|
||||
@@ -743,8 +745,7 @@ public:
|
||||
wl_proxy_set_queue((wl_proxy*)wrappedToplevel, WaylandQueue);
|
||||
toplevelDrag = xdg_toplevel_drag_manager_v1_get_xdg_toplevel_drag(DragManager, dataSource);
|
||||
|
||||
Float2 offset(100, 240);
|
||||
Float2 scaledOffset = offset / window->GetDpiScale();
|
||||
Float2 scaledOffset = dragOffset / window->GetDpiScale();
|
||||
//xdg_toplevel_drag_v1_attach(toplevelDrag, toplevel, (int32)scaledOffset.X, (int32)scaledOffset.Y);
|
||||
|
||||
xdg_toplevel_drag_v1_attach(toplevelDrag, wrappedToplevel, (int32)scaledOffset.X, (int32)scaledOffset.Y);
|
||||
@@ -809,18 +810,52 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
DragDropEffect Window::DoDragDropWayland(const StringView& data)
|
||||
DragDropEffect Window::DoDragDropWayland(const StringView& data, Window* dragSourceWindow, Float2 dragOffset)
|
||||
{
|
||||
// For drag-and-drop, we need to setup the event queue in separate thread to avoid racing issues
|
||||
// while SDL is dispatching the main Wayland event queue when receiving the data offer from us.
|
||||
|
||||
// Show()?
|
||||
{
|
||||
if (!_visible)
|
||||
{
|
||||
if (_showAfterFirstPaint)
|
||||
{
|
||||
if (RenderTask)
|
||||
RenderTask->Enabled = true;
|
||||
}
|
||||
else
|
||||
SDL_ShowWindow(_window);
|
||||
}
|
||||
WindowBase::Show();
|
||||
}
|
||||
|
||||
//while (true)
|
||||
{
|
||||
const double time = Platform::GetTimeSeconds();
|
||||
|
||||
// Update game logic
|
||||
if (Time::OnBeginUpdate(time))
|
||||
{
|
||||
Engine::OnUpdate();
|
||||
Engine::OnLateUpdate();
|
||||
Time::OnEndUpdate();
|
||||
}
|
||||
|
||||
SDLPlatform::Tick();
|
||||
Engine::OnDraw();
|
||||
|
||||
Platform::Sleep(1);
|
||||
}
|
||||
|
||||
waylandDraggingActive = true;
|
||||
|
||||
auto task = New<WaylandDragDropJob>();
|
||||
task->data = data;
|
||||
task->window = this;
|
||||
task->mainwindow = Engine::MainWindow;
|
||||
task->dragSourceWindow = dragSourceWindow; // Needs to be the parent window when dragging a tab to window
|
||||
task->dragOver = 0;
|
||||
task->dragOffset = dragOffset;
|
||||
Task::StartNew(task);
|
||||
while (task->GetState() == TaskState::Queued)
|
||||
Platform::Sleep(1);
|
||||
@@ -837,8 +872,8 @@ DragDropEffect Window::DoDragDropWayland(const StringView& data)
|
||||
while (Platform::AtomicRead(&task->dragOver) == 0)
|
||||
{
|
||||
SDLPlatform::Tick();
|
||||
//Scripting::Update(); // For docking updates
|
||||
//Engine::OnDraw();
|
||||
Engine::OnUpdate();//Scripting::Update(); // For docking updates
|
||||
Engine::OnDraw();
|
||||
|
||||
Platform::Sleep(1);
|
||||
|
||||
@@ -851,6 +886,9 @@ DragDropEffect Window::DoDragDropWayland(const StringView& data)
|
||||
}
|
||||
}
|
||||
|
||||
// The mouse up event was ignored earlier, release the button now
|
||||
Input::Mouse->OnMouseUp(Platform::GetMousePosition(), MouseButton::Left, this);
|
||||
|
||||
Platform::AtomicStore(&task->ExitFlag, 1);
|
||||
task->Wait();
|
||||
|
||||
@@ -1567,6 +1605,11 @@ void SDLPlatform::SetHighDpiAwarenessEnabled(bool enable)
|
||||
|
||||
bool SDLPlatform::UsesWayland()
|
||||
{
|
||||
if (xDisplay == nullptr && WaylandDisplay == nullptr)
|
||||
{
|
||||
// In case the X11 display pointer has not been updated yet
|
||||
return strcmp(SDL_GetCurrentVideoDriver(), "wayland") == 0;
|
||||
}
|
||||
return WaylandDisplay != nullptr;
|
||||
}
|
||||
|
||||
@@ -1582,6 +1625,11 @@ bool SDLPlatform::UsesXWayland()
|
||||
|
||||
bool SDLPlatform::UsesX11()
|
||||
{
|
||||
if (xDisplay == nullptr && WaylandDisplay == nullptr)
|
||||
{
|
||||
// In case the X11 display pointer has not been updated yet
|
||||
return strcmp(SDL_GetCurrentVideoDriver(), "x11") == 0;
|
||||
}
|
||||
return xDisplay != nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ void SDLPlatform::Tick()
|
||||
}
|
||||
else
|
||||
{
|
||||
/*#if PLATFORM_LINUX
|
||||
#if PLATFORM_LINUX
|
||||
String dockHintWindow("DockHint.Window");
|
||||
Window* window = nullptr;
|
||||
WindowsManager::WindowsLocker.Lock();
|
||||
@@ -197,7 +197,7 @@ void SDLPlatform::Tick()
|
||||
mousePos += Float2(static_cast<float>(left), static_cast<float>(-top));
|
||||
Input::Mouse->OnMouseMove(mousePos, window);
|
||||
}
|
||||
#endif*/
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ SDLWindow::SDLWindow(const CreateWindowSettings& settings)
|
||||
flags |= SDL_WINDOW_RESIZABLE;
|
||||
if (_settings.IsTopmost)
|
||||
flags |= SDL_WINDOW_ALWAYS_ON_TOP;
|
||||
if (_settings.SupportsTransparency)
|
||||
//if (_settings.SupportsTransparency)
|
||||
flags |= SDL_WINDOW_TRANSPARENT;
|
||||
|
||||
// Disable parenting of child windows as those are always on top of the parent window and never show up in taskbar
|
||||
@@ -406,7 +406,7 @@ SDLWindow* SDLWindow::GetWindowWithSDLWindow(SDL_Window* window)
|
||||
|
||||
void SDLWindow::HandleEvent(SDL_Event& event)
|
||||
{
|
||||
if (_isClosing || waylandDraggingActive)
|
||||
if (_isClosing)
|
||||
return;
|
||||
|
||||
switch (event.type)
|
||||
@@ -640,16 +640,41 @@ void SDLWindow::HandleEvent(SDL_Event& event)
|
||||
return;
|
||||
}
|
||||
case SDL_EVENT_DROP_BEGIN:
|
||||
case SDL_EVENT_DROP_POSITION:
|
||||
case SDL_EVENT_DROP_FILE:
|
||||
case SDL_EVENT_DROP_TEXT:
|
||||
case SDL_EVENT_DROP_COMPLETE:
|
||||
{
|
||||
LOG(Info, "SDL_EVENT_DROP_BEGIN");
|
||||
//LOG(Info, "SDL_EVENT_DROP_BEGIN");
|
||||
|
||||
static Float2 dragStartPosition = Float2::Zero;
|
||||
|
||||
auto dpiScale = GetDpiScale();
|
||||
const Float2 mousePos = ClientToScreen({ event.drop.x * dpiScale, event.drop.y * dpiScale});
|
||||
//const Float2 mousePos = ClientToScreen({ event.drop.x * dpiScale, event.drop.y * dpiScale});
|
||||
const Float2 mousePos = dragStartPosition + Float2(event.drop.x * dpiScale, event.drop.y * dpiScale);
|
||||
DragDropEffect effect = DragDropEffect::None;
|
||||
auto daata = event.drop.data;
|
||||
|
||||
SDLDropTextData dropData;
|
||||
OnDragEnter(&dropData, mousePos, effect);
|
||||
|
||||
|
||||
|
||||
if (event.type == SDL_EVENT_DROP_BEGIN)
|
||||
{
|
||||
dragStartPosition = Platform::GetMousePosition();
|
||||
OnDragEnter(&dropData, mousePos, effect);
|
||||
}
|
||||
else if (event.type == SDL_EVENT_DROP_POSITION)
|
||||
{
|
||||
Input::Mouse->OnMouseMove(mousePos, this);
|
||||
OnDragOver(&dropData, mousePos, effect);
|
||||
}
|
||||
else if (event.type == SDL_EVENT_DROP_FILE)
|
||||
OnDragDrop(&dropData, mousePos, effect);
|
||||
else if (event.type == SDL_EVENT_DROP_TEXT)
|
||||
OnDragDrop(&dropData, mousePos, effect);
|
||||
else if (event.type == SDL_EVENT_DROP_COMPLETE)
|
||||
OnDragLeave();
|
||||
/*Focus();
|
||||
Float2 mousePosition;
|
||||
SDL_GetGlobalMouseState(&mousePosition.X, &mousePosition.Y);
|
||||
@@ -659,21 +684,19 @@ void SDLWindow::HandleEvent(SDL_Event& event)
|
||||
SDLDropTextData dropData;
|
||||
OnDragEnter(&dropData, mousePosition, effect);
|
||||
OnDragOver(&dropData, mousePosition, effect);*/
|
||||
return;
|
||||
break;
|
||||
}
|
||||
case SDL_EVENT_DROP_POSITION:
|
||||
/*case SDL_EVENT_DROP_POSITION:
|
||||
{
|
||||
auto dpiScale = GetDpiScale();
|
||||
const Float2 mousePos = ClientToScreen({ event.drop.x * dpiScale, event.drop.y * dpiScale});
|
||||
//const Float2 mousePos = ClientToScreen({ event.drop.x * dpiScale, event.drop.y * dpiScale});
|
||||
const Float2 mousePos(event.drop.x * dpiScale, event.drop.y * dpiScale);
|
||||
DragDropEffect effect = DragDropEffect::None;
|
||||
auto daata = event.drop.data;
|
||||
|
||||
SDLDropTextData dropData;
|
||||
OnDragOver(&dropData, mousePos, effect);
|
||||
/*DragDropEffect effect = DragDropEffect::None;
|
||||
|
||||
SDLDropTextData dropData;
|
||||
OnDragOver(&dropData, Float2(static_cast<float>(event.drop.x), static_cast<float>(event.drop.y)), effect);*/
|
||||
break;
|
||||
}
|
||||
case SDL_EVENT_DROP_FILE:
|
||||
@@ -688,16 +711,7 @@ void SDLWindow::HandleEvent(SDL_Event& event)
|
||||
OnDragDrop(&dropData, mousePos, effect);
|
||||
|
||||
|
||||
/*SDLDropFilesData dropData;
|
||||
dropData.Files.Add(StringAnsi(event.drop.data).ToString()); // TODO: collect multiple files at once?
|
||||
|
||||
Focus();
|
||||
|
||||
Float2 mousePosition;
|
||||
SDL_GetGlobalMouseState(&mousePosition.X, &mousePosition.Y);
|
||||
mousePosition = ScreenToClient(mousePosition);
|
||||
DragDropEffect effect = DragDropEffect::None;
|
||||
OnDragDrop(&dropData, mousePosition, effect);*/
|
||||
return;
|
||||
}
|
||||
case SDL_EVENT_DROP_TEXT:
|
||||
@@ -713,16 +727,6 @@ void SDLWindow::HandleEvent(SDL_Event& event)
|
||||
SDLDropTextData dropData;
|
||||
OnDragDrop(&dropData, mousePos, effect);
|
||||
|
||||
/*SDLDropTextData dropData;
|
||||
String str = StringAnsi(event.drop.data).ToString();
|
||||
dropData.Text = StringView(str);
|
||||
|
||||
Focus();
|
||||
Float2 mousePosition;
|
||||
SDL_GetGlobalMouseState(&mousePosition.X, &mousePosition.Y);
|
||||
mousePosition = ScreenToClient(mousePosition);
|
||||
DragDropEffect effect = DragDropEffect::None;
|
||||
OnDragDrop(&dropData, mousePosition, effect);*/
|
||||
return;
|
||||
}
|
||||
case SDL_EVENT_DROP_COMPLETE:
|
||||
@@ -740,7 +744,7 @@ void SDLWindow::HandleEvent(SDL_Event& event)
|
||||
//_dragOver = false;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
#endif
|
||||
case SDL_EVENT_WINDOW_MOUSE_LEAVE:
|
||||
{
|
||||
@@ -792,10 +796,10 @@ void SDLWindow::Show()
|
||||
}
|
||||
|
||||
SDL_ShowWindow(_window);
|
||||
/*if (_settings.AllowInput && _settings.ActivateWhenFirstShown)
|
||||
if (_settings.AllowInput && _settings.ActivateWhenFirstShown)
|
||||
Focus();
|
||||
else if (_settings.Parent == nullptr)
|
||||
BringToFront();*/
|
||||
BringToFront();
|
||||
|
||||
// Reused top-most windows (DockHintWindow) doesn't stay on top for some reason
|
||||
if (_settings.IsTopmost && _settings.Type != WindowType::Tooltip)
|
||||
@@ -1108,7 +1112,7 @@ String SDLWindow::GetTitle() const
|
||||
|
||||
void SDLWindow::SetTitle(const StringView& title)
|
||||
{
|
||||
//SDL_SetWindowTitle(_window, title.ToStringAnsi().Get());
|
||||
SDL_SetWindowTitle(_window, title.ToStringAnsi().Get());
|
||||
}
|
||||
|
||||
void SDLWindow::StartTrackingMouse(bool useMouseScreenOffset)
|
||||
@@ -1299,11 +1303,26 @@ void SDLWindow::UpdateCursor()
|
||||
wl_display_flush((wl_display*)SDL_GetPointerProperty(SDL_GetGlobalProperties(), SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER, nullptr));
|
||||
}*/
|
||||
|
||||
void SDLWindow::StartDragging(const Float2& offset)
|
||||
void SDLWindow::StartDragging(const Float2& offset, Window* dragSourceWindow)
|
||||
{
|
||||
LOG(Info, "StartDragging {}", offset);
|
||||
|
||||
DoDragDropWayland(String("notawindow"));
|
||||
Float2 dragOffset = offset;
|
||||
if (_settings.HasBorder)
|
||||
{
|
||||
#if PLATFORM_LINUX
|
||||
if (SDLPlatform::UsesWayland() && dragSourceWindow == this)
|
||||
{
|
||||
// Wayland includes the decorations in the client-space coordinates, adjust the offset for it.
|
||||
// Assume the title decoration is 25px thick...
|
||||
float topOffset = 25.0f;
|
||||
dragOffset += Float2(0.0f, topOffset);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
SetOpacity(0.1f);
|
||||
DoDragDropWayland(String("notawindow"), dragSourceWindow, dragOffset);
|
||||
/*
|
||||
_dragOver = true;
|
||||
|
||||
@@ -1339,6 +1358,8 @@ void SDLWindow::StartDragging(const Float2& offset)
|
||||
void SDLWindow::StopDragging()
|
||||
{
|
||||
LOG(Info, "StopDragging");
|
||||
|
||||
SetOpacity(1.0f);
|
||||
/*
|
||||
wl_data_device_set_user_data(dataDevice, nullptr);
|
||||
_dragOver = false;
|
||||
|
||||
@@ -62,7 +62,7 @@ private:
|
||||
void UpdateCursor();
|
||||
|
||||
#if PLATFORM_LINUX
|
||||
DragDropEffect DoDragDropWayland(const StringView& data);
|
||||
DragDropEffect DoDragDropWayland(const StringView& data, Window* dragSourceWindow = nullptr, Float2 dragOffset = Float2::Zero);
|
||||
DragDropEffect DoDragDropX11(const StringView& data);
|
||||
#endif
|
||||
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
void StartClippingCursor(const Rectangle& bounds) override;
|
||||
void EndClippingCursor() override;
|
||||
void SetCursor(CursorType type) override;
|
||||
void StartDragging(const Float2& offset) override;
|
||||
void StartDragging(const Float2& offset, Window* dragSourceWindow) override;
|
||||
void StopDragging() override;
|
||||
|
||||
#if USE_EDITOR && PLATFORM_WINDOWS
|
||||
|
||||
@@ -424,7 +424,7 @@ namespace FlaxEngine.GUI
|
||||
if (!IsDisposing)
|
||||
{
|
||||
// Arrange child controls
|
||||
//PerformLayout();
|
||||
PerformLayout();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -454,7 +454,7 @@ namespace FlaxEngine.GUI
|
||||
// Add child
|
||||
_children.Add(child);
|
||||
|
||||
//OnChildrenChanged();
|
||||
OnChildrenChanged();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -468,7 +468,7 @@ namespace FlaxEngine.GUI
|
||||
// Remove child
|
||||
_children.Remove(child);
|
||||
|
||||
// OnChildrenChanged();
|
||||
OnChildrenChanged();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -679,11 +679,11 @@ namespace FlaxEngine.GUI
|
||||
_containsFocus = result;
|
||||
if (result)
|
||||
{
|
||||
//OnStartContainsFocus();
|
||||
OnStartContainsFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
//OnEndContainsFocus();
|
||||
OnEndContainsFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1337,7 +1337,7 @@ namespace FlaxEngine.GUI
|
||||
bool wasLayoutLocked = _isLayoutLocked;
|
||||
_isLayoutLocked = true;
|
||||
|
||||
//base.OnSizeChanged();
|
||||
base.OnSizeChanged();
|
||||
|
||||
// Fire event
|
||||
for (int i = 0; i < _children.Count; i++)
|
||||
@@ -1346,7 +1346,7 @@ namespace FlaxEngine.GUI
|
||||
}
|
||||
|
||||
// Restore state
|
||||
//_isLayoutLocked = wasLayoutLocked;
|
||||
_isLayoutLocked = wasLayoutLocked;
|
||||
|
||||
// Arrange child controls
|
||||
PerformLayout();
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace FlaxEngine.GUI
|
||||
if (_parent == value)
|
||||
return;
|
||||
|
||||
//Defocus();
|
||||
Defocus();
|
||||
|
||||
Float2 oldParentSize;
|
||||
if (_parent != null)
|
||||
@@ -133,20 +133,20 @@ namespace FlaxEngine.GUI
|
||||
else
|
||||
{
|
||||
oldParentSize = Float2.Zero;
|
||||
//ClearState();
|
||||
ClearState();
|
||||
}
|
||||
|
||||
_parent = value;
|
||||
_parent?.AddChildInternal(this);
|
||||
|
||||
CacheRootHandle();
|
||||
/*OnParentChangedInternal();
|
||||
OnParentChangedInternal();
|
||||
|
||||
// Check if parent size has been changed
|
||||
if (_parent != null && !_parent.Size.Equals(ref oldParentSize))
|
||||
{
|
||||
OnParentResized();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -461,13 +461,13 @@ namespace FlaxEngine.GUI
|
||||
/// </summary>
|
||||
public virtual void ClearState()
|
||||
{
|
||||
/*Defocus();
|
||||
Defocus();
|
||||
if (_isMouseOver)
|
||||
OnMouseLeave();
|
||||
if (_isDragOver)
|
||||
OnDragLeave();
|
||||
while (_touchOvers != null && _touchOvers.Count != 0)
|
||||
OnTouchLeave(_touchOvers[0]);*/
|
||||
OnTouchLeave(_touchOvers[0]);
|
||||
}
|
||||
|
||||
#region Focus
|
||||
@@ -1347,8 +1347,8 @@ namespace FlaxEngine.GUI
|
||||
/// </summary>
|
||||
protected virtual void OnSizeChanged()
|
||||
{
|
||||
//SizeChanged?.Invoke(this);
|
||||
//_parent?.OnChildResized(this);
|
||||
SizeChanged?.Invoke(this);
|
||||
_parent?.OnChildResized(this);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1422,12 +1422,12 @@ namespace FlaxEngine.GUI
|
||||
/// </summary>
|
||||
internal virtual void CacheRootHandle()
|
||||
{
|
||||
//if (_root != null)
|
||||
// RemoveUpdateCallbacks(_root);
|
||||
if (_root != null)
|
||||
RemoveUpdateCallbacks(_root);
|
||||
|
||||
_root = _parent?.Root;
|
||||
//if (_root != null)
|
||||
// AddUpdateCallbacks(_root);
|
||||
if (_root != null)
|
||||
AddUpdateCallbacks(_root);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace FlaxEngine.GUI
|
||||
Profiler.BeginEvent("RootControl.Update");
|
||||
for (int i = 0; i < UpdateCallbacks.Count; i++)
|
||||
{
|
||||
//UpdateCallbacks[i](deltaTime);
|
||||
UpdateCallbacks[i](deltaTime);
|
||||
}
|
||||
}
|
||||
finally
|
||||
|
||||
@@ -56,7 +56,6 @@ namespace FlaxEngine.GUI
|
||||
/// <param name="targetArea">Tooltip target area of interest.</param>
|
||||
public void Show(Control target, Float2 location, Rectangle targetArea)
|
||||
{
|
||||
return;
|
||||
if (target == null)
|
||||
throw new ArgumentNullException();
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace FlaxEngine.GUI
|
||||
/// </summary>
|
||||
public void Show()
|
||||
{
|
||||
//_window.Show();
|
||||
_window.Show();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -77,7 +77,7 @@ namespace FlaxEngine.GUI
|
||||
/// </summary>
|
||||
public void Hide()
|
||||
{
|
||||
//_window.Hide();
|
||||
_window.Hide();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -85,7 +85,7 @@ namespace FlaxEngine.GUI
|
||||
/// </summary>
|
||||
public void Minimize()
|
||||
{
|
||||
//_window.Minimize();
|
||||
_window.Minimize();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -93,7 +93,7 @@ namespace FlaxEngine.GUI
|
||||
/// </summary>
|
||||
public void Maximize()
|
||||
{
|
||||
//_window.Maximize();
|
||||
_window.Maximize();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -101,7 +101,7 @@ namespace FlaxEngine.GUI
|
||||
/// </summary>
|
||||
public void Restore()
|
||||
{
|
||||
//_window.Restore();
|
||||
_window.Restore();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -119,7 +119,7 @@ namespace FlaxEngine.GUI
|
||||
/// <param name="force">True if move to the front by force, otherwise false.</param>
|
||||
public void BringToFront(bool force = false)
|
||||
{
|
||||
//_window.BringToFront(force);
|
||||
_window.BringToFront(force);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -127,7 +127,7 @@ namespace FlaxEngine.GUI
|
||||
/// </summary>
|
||||
public void FlashWindow()
|
||||
{
|
||||
//_window.FlashWindow();
|
||||
_window.FlashWindow();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -179,7 +179,7 @@ namespace FlaxEngine.GUI
|
||||
|
||||
_trackingControl = control;
|
||||
|
||||
//_window.StartTrackingMouse(useMouseScreenOffset);
|
||||
_window.StartTrackingMouse(useMouseScreenOffset);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -191,7 +191,7 @@ namespace FlaxEngine.GUI
|
||||
_trackingControl = null;
|
||||
control.OnEndMouseCapture();
|
||||
|
||||
//_window.EndTrackingMouse();
|
||||
_window.EndTrackingMouse();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ namespace FlaxEngine.GUI
|
||||
/// <inheritdoc />
|
||||
public override void Focus()
|
||||
{
|
||||
//_window.Focus();
|
||||
_window.Focus();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
2
Source/ThirdParty/SDL/SDL3/SDL.h
vendored
2
Source/ThirdParty/SDL/SDL3/SDL.h
vendored
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Main include header for the SDL library, version 3.1.7
|
||||
* Main include header for the SDL library, version 3.1.9
|
||||
*
|
||||
* It is almost always best to include just this one header instead of
|
||||
* picking out individual headers included here. There are exceptions to
|
||||
|
||||
4
Source/ThirdParty/SDL/SDL3/SDL_assert.h
vendored
4
Source/ThirdParty/SDL/SDL3/SDL_assert.h
vendored
@@ -127,10 +127,12 @@ extern "C" {
|
||||
*/
|
||||
#define SDL_TriggerBreakpoint() TriggerABreakpointInAPlatformSpecificManner
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
#elif defined(_MSC_VER) && _MSC_VER >= 1310
|
||||
/* Don't include intrin.h here because it contains C++ code */
|
||||
extern void __cdecl __debugbreak(void);
|
||||
#define SDL_TriggerBreakpoint() __debugbreak()
|
||||
#elif defined(_MSC_VER) && defined(_M_IX86)
|
||||
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
|
||||
#elif defined(ANDROID)
|
||||
#include <assert.h>
|
||||
#define SDL_TriggerBreakpoint() assert(0)
|
||||
|
||||
22
Source/ThirdParty/SDL/SDL3/SDL_asyncio.h
vendored
22
Source/ThirdParty/SDL/SDL3/SDL_asyncio.h
vendored
@@ -213,7 +213,7 @@ typedef struct SDL_AsyncIOQueue SDL_AsyncIOQueue;
|
||||
* \returns a pointer to the SDL_AsyncIO structure that is created or NULL on
|
||||
* failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_CloseAsyncIO
|
||||
* \sa SDL_ReadAsyncIO
|
||||
@@ -234,7 +234,7 @@ extern SDL_DECLSPEC SDL_AsyncIO * SDLCALL SDL_AsyncIOFromFile(const char *file,
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*/
|
||||
extern SDL_DECLSPEC Sint64 SDLCALL SDL_GetAsyncIOSize(SDL_AsyncIO *asyncio);
|
||||
|
||||
@@ -269,7 +269,7 @@ extern SDL_DECLSPEC Sint64 SDLCALL SDL_GetAsyncIOSize(SDL_AsyncIO *asyncio);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_WriteAsyncIO
|
||||
* \sa SDL_CreateAsyncIOQueue
|
||||
@@ -306,7 +306,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_ReadAsyncIO(SDL_AsyncIO *asyncio, void *ptr
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_ReadAsyncIO
|
||||
* \sa SDL_CreateAsyncIOQueue
|
||||
@@ -358,7 +358,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WriteAsyncIO(SDL_AsyncIO *asyncio, void *pt
|
||||
* \threadsafety It is safe to call this function from any thread, but two
|
||||
* threads should not attempt to close the same object.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_CloseAsyncIO(SDL_AsyncIO *asyncio, bool flush, SDL_AsyncIOQueue *queue, void *userdata);
|
||||
|
||||
@@ -373,7 +373,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CloseAsyncIO(SDL_AsyncIO *asyncio, bool flu
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_DestroyAsyncIOQueue
|
||||
* \sa SDL_GetAsyncIOResult
|
||||
@@ -407,7 +407,7 @@ extern SDL_DECLSPEC SDL_AsyncIOQueue * SDLCALL SDL_CreateAsyncIOQueue(void);
|
||||
* no other thread is waiting on the queue with
|
||||
* SDL_WaitAsyncIOResult.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_DestroyAsyncIOQueue(SDL_AsyncIOQueue *queue);
|
||||
|
||||
@@ -431,7 +431,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyAsyncIOQueue(SDL_AsyncIOQueue *queue
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_WaitAsyncIOResult
|
||||
*/
|
||||
@@ -475,7 +475,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetAsyncIOResult(SDL_AsyncIOQueue *queue, S
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_SignalAsyncIOQueue
|
||||
*/
|
||||
@@ -499,7 +499,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WaitAsyncIOResult(SDL_AsyncIOQueue *queue,
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_WaitAsyncIOResult
|
||||
*/
|
||||
@@ -531,7 +531,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SignalAsyncIOQueue(SDL_AsyncIOQueue *queue)
|
||||
* \returns true on success or false on failure; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_LoadFile_IO
|
||||
*/
|
||||
|
||||
24
Source/ThirdParty/SDL/SDL3/SDL_audio.h
vendored
24
Source/ThirdParty/SDL/SDL3/SDL_audio.h
vendored
@@ -745,7 +745,7 @@ extern SDL_DECLSPEC SDL_AudioDeviceID SDLCALL SDL_OpenAudioDevice(SDL_AudioDevic
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_IsAudioDevicePhysical(SDL_AudioDeviceID devid);
|
||||
|
||||
@@ -759,7 +759,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_IsAudioDevicePhysical(SDL_AudioDeviceID dev
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_IsAudioDevicePlayback(SDL_AudioDeviceID devid);
|
||||
|
||||
@@ -1577,6 +1577,26 @@ extern SDL_DECLSPEC bool SDLCALL SDL_PauseAudioStreamDevice(SDL_AudioStream *str
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_ResumeAudioStreamDevice(SDL_AudioStream *stream);
|
||||
|
||||
/**
|
||||
* Use this function to query if an audio device associated with a stream is
|
||||
* paused.
|
||||
*
|
||||
* Unlike in SDL2, audio devices start in an _unpaused_ state, since an app
|
||||
* has to bind a stream before any audio will flow.
|
||||
*
|
||||
* \param stream the audio stream associated with the audio device to query.
|
||||
* \returns true if device is valid and paused, false otherwise.
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*
|
||||
* \sa SDL_PauseAudioStreamDevice
|
||||
* \sa SDL_ResumeAudioStreamDevice
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_AudioStreamDevicePaused(SDL_AudioStream *stream);
|
||||
|
||||
|
||||
/**
|
||||
* Lock an audio stream for serialized access.
|
||||
*
|
||||
|
||||
2
Source/ThirdParty/SDL/SDL3/SDL_bits.h
vendored
2
Source/ThirdParty/SDL/SDL3/SDL_bits.h
vendored
@@ -78,7 +78,7 @@ SDL_FORCE_INLINE int SDL_MostSignificantBitIndex32(Uint32 x)
|
||||
return -1;
|
||||
}
|
||||
return _SDL_bsr_watcom(x);
|
||||
#elif defined(_MSC_VER)
|
||||
#elif defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
unsigned long index;
|
||||
if (_BitScanReverse(&index, x)) {
|
||||
return (int)index;
|
||||
|
||||
2
Source/ThirdParty/SDL/SDL3/SDL_dialog.h
vendored
2
Source/ThirdParty/SDL/SDL3/SDL_dialog.h
vendored
@@ -312,7 +312,7 @@ typedef enum SDL_FileDialogType
|
||||
* callback may be invoked from the same thread or from a
|
||||
* different one, depending on the OS's constraints.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_FileDialogType
|
||||
* \sa SDL_DialogFileCallback
|
||||
|
||||
2
Source/ThirdParty/SDL/SDL3/SDL_filesystem.h
vendored
2
Source/ThirdParty/SDL/SDL3/SDL_filesystem.h
vendored
@@ -484,7 +484,7 @@ extern SDL_DECLSPEC char ** SDLCALL SDL_GlobDirectory(const char *path, const ch
|
||||
* platform-dependent notation. NULL if there's a problem. This
|
||||
* should be freed with SDL_free() when it is no longer needed.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*/
|
||||
extern SDL_DECLSPEC char * SDLCALL SDL_GetCurrentDirectory(void);
|
||||
|
||||
|
||||
8
Source/ThirdParty/SDL/SDL3/SDL_gpu.h
vendored
8
Source/ThirdParty/SDL/SDL3/SDL_gpu.h
vendored
@@ -2118,7 +2118,7 @@ extern SDL_DECLSPEC SDL_GPUDevice *SDLCALL SDL_CreateGPUDevice(
|
||||
* provide SPIR-V shaders if applicable.
|
||||
* - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOLEAN`: The app is able to
|
||||
* provide DXBC shaders if applicable
|
||||
* `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN`: The app is able to
|
||||
* - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN`: The app is able to
|
||||
* provide DXIL shaders if applicable.
|
||||
* - `SDL_PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOLEAN`: The app is able to
|
||||
* provide MSL shaders if applicable.
|
||||
@@ -3664,7 +3664,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetGPUSwapchainParameters(
|
||||
* \returns true if successful, false on error; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*/
|
||||
extern SDL_DECLSPEC bool SDLCALL SDL_SetGPUAllowedFramesInFlight(
|
||||
SDL_GPUDevice *device,
|
||||
@@ -3749,7 +3749,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_AcquireGPUSwapchainTexture(
|
||||
* \threadsafety This function should only be called from the thread that
|
||||
* created the window.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_AcquireGPUSwapchainTexture
|
||||
* \sa SDL_WaitAndAcquireGPUSwapchainTexture
|
||||
@@ -3792,7 +3792,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WaitForGPUSwapchain(
|
||||
* \threadsafety This function should only be called from the thread that
|
||||
* created the window.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_SubmitGPUCommandBuffer
|
||||
* \sa SDL_SubmitGPUCommandBufferAndAcquireFence
|
||||
|
||||
4
Source/ThirdParty/SDL/SDL3/SDL_init.h
vendored
4
Source/ThirdParty/SDL/SDL3/SDL_init.h
vendored
@@ -313,7 +313,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_Quit(void);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_RunOnMainThread
|
||||
*/
|
||||
@@ -350,7 +350,7 @@ typedef void (SDLCALL *SDL_MainThreadCallback)(void *userdata);
|
||||
*
|
||||
* \threadsafety It is safe to call this function from any thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_IsMainThread
|
||||
*/
|
||||
|
||||
6
Source/ThirdParty/SDL/SDL3/SDL_iostream.h
vendored
6
Source/ThirdParty/SDL/SDL3/SDL_iostream.h
vendored
@@ -703,7 +703,7 @@ extern SDL_DECLSPEC void * SDLCALL SDL_LoadFile(const char *file, size_t *datasi
|
||||
* \returns true on success or false on failure; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_SaveFile
|
||||
* \sa SDL_LoadFile_IO
|
||||
@@ -713,14 +713,14 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SaveFile_IO(SDL_IOStream *src, const void *
|
||||
/**
|
||||
* Save all the data into a file path.
|
||||
*
|
||||
* \param file the path to read all available data from.
|
||||
* \param file the path to write all available data into.
|
||||
* \param data the data to be written. If datasize is 0, may be NULL or a
|
||||
* invalid pointer.
|
||||
* \param datasize the number of bytes to be written.
|
||||
* \returns true on success or false on failure; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_SaveFile_IO
|
||||
* \sa SDL_LoadFile
|
||||
|
||||
14
Source/ThirdParty/SDL/SDL3/SDL_keycode.h
vendored
14
Source/ThirdParty/SDL/SDL3/SDL_keycode.h
vendored
@@ -47,11 +47,15 @@
|
||||
* A special exception is the number keys at the top of the keyboard which map
|
||||
* to SDLK_0...SDLK_9 on AZERTY layouts.
|
||||
*
|
||||
* Keys with the `SDLK_EXTENDED_MASK` bit set do not map to a scancode or
|
||||
* unicode code point.
|
||||
*
|
||||
* \since This datatype is available since SDL 3.1.3.
|
||||
*/
|
||||
typedef Uint32 SDL_Keycode;
|
||||
|
||||
#define SDLK_SCANCODE_MASK (1u<<30)
|
||||
#define SDLK_EXTENDED_MASK (1u << 29)
|
||||
#define SDLK_SCANCODE_MASK (1u << 30)
|
||||
#define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK)
|
||||
#define SDLK_UNKNOWN 0x00000000u /**< 0 */
|
||||
#define SDLK_RETURN 0x0000000du /**< '\r' */
|
||||
@@ -302,6 +306,13 @@ typedef Uint32 SDL_Keycode;
|
||||
#define SDLK_SOFTRIGHT 0x40000120u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTRIGHT) */
|
||||
#define SDLK_CALL 0x40000121u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALL) */
|
||||
#define SDLK_ENDCALL 0x40000122u /**< SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ENDCALL) */
|
||||
#define SDLK_LEFT_TAB 0x20000001u /**< Extended key Left Tab */
|
||||
#define SDLK_LEVEL5_SHIFT 0x20000002u /**< Extended key Level 5 Shift */
|
||||
#define SDLK_MULTI_KEY_COMPOSE 0x20000003u /**< Extended key Multi-key Compose */
|
||||
#define SDLK_LMETA 0x20000004u /**< Extended key Left Meta */
|
||||
#define SDLK_RMETA 0x20000005u /**< Extended key Right Meta */
|
||||
#define SDLK_LHYPER 0x20000006u /**< Extended key Left Hyper */
|
||||
#define SDLK_RHYPER 0x20000007u /**< Extended key Right Hyper */
|
||||
|
||||
/**
|
||||
* Valid key modifiers (possibly OR'd together).
|
||||
@@ -313,6 +324,7 @@ typedef Uint16 SDL_Keymod;
|
||||
#define SDL_KMOD_NONE 0x0000u /**< no modifier is applicable. */
|
||||
#define SDL_KMOD_LSHIFT 0x0001u /**< the left Shift key is down. */
|
||||
#define SDL_KMOD_RSHIFT 0x0002u /**< the right Shift key is down. */
|
||||
#define SDL_KMOD_LEVEL5 0x0004u /**< the Level 5 Shift key is down. */
|
||||
#define SDL_KMOD_LCTRL 0x0040u /**< the left Ctrl (Control) key is down. */
|
||||
#define SDL_KMOD_RCTRL 0x0080u /**< the right Ctrl (Control) key is down. */
|
||||
#define SDL_KMOD_LALT 0x0100u /**< the left Alt key is down. */
|
||||
|
||||
@@ -366,7 +366,7 @@
|
||||
*/
|
||||
#define SDL_WINAPI_FAMILY_PHONE (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
|
||||
|
||||
#elif HAVE_WINAPIFAMILY_H && HAVE_WINAPIFAMILY_H
|
||||
#elif defined(HAVE_WINAPIFAMILY_H) && HAVE_WINAPIFAMILY_H
|
||||
#define SDL_WINAPI_FAMILY_PHONE (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
|
||||
#else
|
||||
#define SDL_WINAPI_FAMILY_PHONE 0
|
||||
|
||||
4
Source/ThirdParty/SDL/SDL3/SDL_render.h
vendored
4
Source/ThirdParty/SDL/SDL3/SDL_render.h
vendored
@@ -2110,7 +2110,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderTextureRotated(SDL_Renderer *renderer
|
||||
*
|
||||
* \threadsafety You may only call this function from the main thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_RenderTexture
|
||||
*/
|
||||
@@ -2568,7 +2568,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenderDebugText(SDL_Renderer *renderer, flo
|
||||
*
|
||||
* \threadsafety This function should only be called on the main thread.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_RenderDebugText
|
||||
* \sa SDL_DEBUG_TEXT_FONT_CHARACTER_SIZE
|
||||
|
||||
4
Source/ThirdParty/SDL/SDL3/SDL_revision.h
vendored
4
Source/ThirdParty/SDL/SDL3/SDL_revision.h
vendored
@@ -31,9 +31,9 @@
|
||||
/* #undef SDL_VENDOR_INFO */
|
||||
|
||||
#ifdef SDL_VENDOR_INFO
|
||||
#define SDL_REVISION "SDL3-3.1.7-preview-3.1.6-637-g8ec576ddab (" SDL_VENDOR_INFO ")"
|
||||
#define SDL_REVISION "SDL3-3.1.9-preview-3.1.8-43-g82125ec1d (" SDL_VENDOR_INFO ")"
|
||||
#else
|
||||
#define SDL_REVISION "SDL3-3.1.7-preview-3.1.6-637-g8ec576ddab"
|
||||
#define SDL_REVISION "SDL3-3.1.9-preview-3.1.8-43-g82125ec1d"
|
||||
#endif
|
||||
|
||||
#endif /* SDL_revision_h_ */
|
||||
|
||||
36
Source/ThirdParty/SDL/SDL3/SDL_stdinc.h
vendored
36
Source/ThirdParty/SDL/SDL3/SDL_stdinc.h
vendored
@@ -107,6 +107,32 @@ void *alloca(size_t);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
|
||||
|
||||
/**
|
||||
* Don't let SDL use "long long" C types.
|
||||
*
|
||||
* SDL will define this if it believes the compiler doesn't understand the
|
||||
* "long long" syntax for C datatypes. This can happen on older compilers.
|
||||
*
|
||||
* If _your_ compiler doesn't support "long long" but SDL doesn't know it, it
|
||||
* is safe to define this yourself to build against the SDL headers.
|
||||
*
|
||||
* If this is defined, it will remove access to some C runtime support
|
||||
* functions, like SDL_ulltoa and SDL_strtoll that refer to this datatype
|
||||
* explicitly. The rest of SDL will still be available.
|
||||
*
|
||||
* SDL's own source code cannot be built with a compiler that has this
|
||||
* defined, for various technical reasons.
|
||||
*/
|
||||
#define SDL_NOLONGLONG 1
|
||||
|
||||
#elif defined(_MSC_VER) && (_MSC_VER < 1310) /* long long introduced in Visual Studio.NET 2003 */
|
||||
# define SDL_NOLONGLONG 1
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef SDL_WIKI_DOCUMENTATION_SECTION
|
||||
|
||||
/**
|
||||
@@ -753,7 +779,9 @@ typedef Sint64 SDL_Time;
|
||||
#endif
|
||||
/* Specifically for the `long long` -- SDL-specific. */
|
||||
#ifdef SDL_PLATFORM_WINDOWS
|
||||
#ifndef SDL_NOLONGLONG
|
||||
SDL_COMPILE_TIME_ASSERT(longlong_size64, sizeof(long long) == 8); /* using I64 for windows - make sure `long long` is 64 bits. */
|
||||
#endif
|
||||
#define SDL_PRILL_PREFIX "I64"
|
||||
#else
|
||||
#define SDL_PRILL_PREFIX "ll"
|
||||
@@ -1126,8 +1154,10 @@ SDL_COMPILE_TIME_ASSERT(uint32_size, sizeof(Uint32) == 4);
|
||||
SDL_COMPILE_TIME_ASSERT(sint32_size, sizeof(Sint32) == 4);
|
||||
SDL_COMPILE_TIME_ASSERT(uint64_size, sizeof(Uint64) == 8);
|
||||
SDL_COMPILE_TIME_ASSERT(sint64_size, sizeof(Sint64) == 8);
|
||||
#ifndef SDL_NOLONGLONG
|
||||
SDL_COMPILE_TIME_ASSERT(uint64_longlong, sizeof(Uint64) <= sizeof(unsigned long long));
|
||||
SDL_COMPILE_TIME_ASSERT(size_t_longlong, sizeof(size_t) <= sizeof(unsigned long long));
|
||||
#endif
|
||||
typedef struct SDL_alignment_test
|
||||
{
|
||||
Uint8 a;
|
||||
@@ -3492,6 +3522,8 @@ extern SDL_DECLSPEC char * SDLCALL SDL_ltoa(long value, char *str, int radix);
|
||||
*/
|
||||
extern SDL_DECLSPEC char * SDLCALL SDL_ultoa(unsigned long value, char *str, int radix);
|
||||
|
||||
#ifndef SDL_NOLONGLONG
|
||||
|
||||
/**
|
||||
* Convert a long long integer into a string.
|
||||
*
|
||||
@@ -3547,6 +3579,7 @@ extern SDL_DECLSPEC char * SDLCALL SDL_lltoa(long long value, char *str, int rad
|
||||
* \sa SDL_ultoa
|
||||
*/
|
||||
extern SDL_DECLSPEC char * SDLCALL SDL_ulltoa(unsigned long long value, char *str, int radix);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Parse an `int` from a string.
|
||||
@@ -3660,6 +3693,8 @@ extern SDL_DECLSPEC long SDLCALL SDL_strtol(const char *str, char **endp, int ba
|
||||
*/
|
||||
extern SDL_DECLSPEC unsigned long SDLCALL SDL_strtoul(const char *str, char **endp, int base);
|
||||
|
||||
#ifndef SDL_NOLONGLONG
|
||||
|
||||
/**
|
||||
* Parse a `long long` from a string.
|
||||
*
|
||||
@@ -3726,6 +3761,7 @@ extern SDL_DECLSPEC long long SDLCALL SDL_strtoll(const char *str, char **endp,
|
||||
* \sa SDL_ulltoa
|
||||
*/
|
||||
extern SDL_DECLSPEC unsigned long long SDLCALL SDL_strtoull(const char *str, char **endp, int base);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Parse a `double` from a string.
|
||||
|
||||
4
Source/ThirdParty/SDL/SDL3/SDL_storage.h
vendored
4
Source/ThirdParty/SDL/SDL3/SDL_storage.h
vendored
@@ -47,7 +47,7 @@
|
||||
*
|
||||
* Consider the following example:
|
||||
*
|
||||
* ```
|
||||
* ```c
|
||||
* void ReadGameData(void)
|
||||
* {
|
||||
* extern char** fileNames;
|
||||
@@ -115,7 +115,7 @@
|
||||
* When using, SDL_Storage, these types of problems are virtually impossible
|
||||
* to trip over:
|
||||
*
|
||||
* ```
|
||||
* ```c
|
||||
* void ReadGameData(void)
|
||||
* {
|
||||
* extern char** fileNames;
|
||||
|
||||
2
Source/ThirdParty/SDL/SDL3/SDL_thread.h
vendored
2
Source/ThirdParty/SDL/SDL3/SDL_thread.h
vendored
@@ -446,7 +446,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_WaitThread(SDL_Thread *thread, int *status)
|
||||
* \returns the current state of a thread, or SDL_THREAD_UNKNOWN if the thread
|
||||
* isn't valid.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_ThreadState
|
||||
*/
|
||||
|
||||
51
Source/ThirdParty/SDL/SDL3/SDL_tray.h
vendored
51
Source/ThirdParty/SDL/SDL3/SDL_tray.h
vendored
@@ -106,7 +106,7 @@ typedef void (SDLCALL *SDL_TrayCallback)(void *userdata, SDL_TrayEntry *entry);
|
||||
* UTF-8 encoding. Not supported on all platforms. May be NULL.
|
||||
* \returns The newly created system tray icon.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_CreateTrayMenu
|
||||
* \sa SDL_GetTrayMenu
|
||||
@@ -120,7 +120,7 @@ extern SDL_DECLSPEC SDL_Tray *SDLCALL SDL_CreateTray(SDL_Surface *icon, const ch
|
||||
* \param tray the tray icon to be updated.
|
||||
* \param icon the new icon. May be NULL.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_CreateTray
|
||||
*/
|
||||
@@ -132,7 +132,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetTrayIcon(SDL_Tray *tray, SDL_Surface *ic
|
||||
* \param tray the tray icon to be updated.
|
||||
* \param tooltip the new tooltip in UTF-8 encoding. May be NULL.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_CreateTray
|
||||
*/
|
||||
@@ -151,7 +151,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetTrayTooltip(SDL_Tray *tray, const char *
|
||||
* \param tray the tray to bind the menu to.
|
||||
* \returns the newly created menu.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_CreateTray
|
||||
* \sa SDL_GetTrayMenu
|
||||
@@ -172,7 +172,7 @@ extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_CreateTrayMenu(SDL_Tray *tray);
|
||||
* \param entry the tray entry to bind the menu to.
|
||||
* \returns the newly created menu.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_InsertTrayEntryAt
|
||||
* \sa SDL_GetTraySubmenu
|
||||
@@ -194,7 +194,7 @@ extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_CreateTraySubmenu(SDL_TrayEntry *e
|
||||
* \param tray the tray entry to bind the menu to.
|
||||
* \returns the newly created menu.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_CreateTray
|
||||
* \sa SDL_CreateTrayMenu
|
||||
@@ -215,7 +215,7 @@ extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_GetTrayMenu(SDL_Tray *tray);
|
||||
* \param entry the tray entry to bind the menu to.
|
||||
* \returns the newly created menu.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_InsertTrayEntryAt
|
||||
* \sa SDL_CreateTraySubmenu
|
||||
@@ -232,7 +232,7 @@ extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_GetTraySubmenu(SDL_TrayEntry *entr
|
||||
* pointer becomes invalid when any function that inserts or deletes
|
||||
* entries in the menu is called.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_RemoveTrayEntry
|
||||
* \sa SDL_InsertTrayEntryAt
|
||||
@@ -244,7 +244,7 @@ extern SDL_DECLSPEC const SDL_TrayEntry **SDLCALL SDL_GetTrayEntries(SDL_TrayMen
|
||||
*
|
||||
* \param entry The entry to be deleted.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_GetTrayEntries
|
||||
* \sa SDL_InsertTrayEntryAt
|
||||
@@ -267,7 +267,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_RemoveTrayEntry(SDL_TrayEntry *entry);
|
||||
* \param flags a combination of flags, some of which are mandatory.
|
||||
* \returns the newly created entry, or NULL if pos is out of bounds.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_TrayEntryFlags
|
||||
* \sa SDL_GetTrayEntries
|
||||
@@ -287,7 +287,7 @@ extern SDL_DECLSPEC SDL_TrayEntry *SDLCALL SDL_InsertTrayEntryAt(SDL_TrayMenu *m
|
||||
* \param entry the entry to be updated.
|
||||
* \param label the new label for the entry in UTF-8 encoding.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_GetTrayEntries
|
||||
* \sa SDL_InsertTrayEntryAt
|
||||
@@ -303,7 +303,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetTrayEntryLabel(SDL_TrayEntry *entry, con
|
||||
* \param entry the entry to be read.
|
||||
* \returns the label of the entry in UTF-8 encoding.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_GetTrayEntries
|
||||
* \sa SDL_InsertTrayEntryAt
|
||||
@@ -320,7 +320,7 @@ extern SDL_DECLSPEC const char *SDLCALL SDL_GetTrayEntryLabel(SDL_TrayEntry *ent
|
||||
* \param checked SDL_TRUE if the entry should be checked; SDL_FALSE
|
||||
* otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_GetTrayEntries
|
||||
* \sa SDL_InsertTrayEntryAt
|
||||
@@ -336,7 +336,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetTrayEntryChecked(SDL_TrayEntry *entry, b
|
||||
* \param entry the entry to be read.
|
||||
* \returns SDL_TRUE if the entry is checked; SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_GetTrayEntries
|
||||
* \sa SDL_InsertTrayEntryAt
|
||||
@@ -351,7 +351,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetTrayEntryChecked(SDL_TrayEntry *entry);
|
||||
* \param enabled SDL_TRUE if the entry should be enabled; SDL_FALSE
|
||||
* otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_GetTrayEntries
|
||||
* \sa SDL_InsertTrayEntryAt
|
||||
@@ -365,7 +365,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetTrayEntryEnabled(SDL_TrayEntry *entry, b
|
||||
* \param entry the entry to be read.
|
||||
* \returns SDL_TRUE if the entry is enabled; SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_GetTrayEntries
|
||||
* \sa SDL_InsertTrayEntryAt
|
||||
@@ -381,13 +381,22 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetTrayEntryEnabled(SDL_TrayEntry *entry);
|
||||
* \param userdata an optional pointer to pass extra data to the callback when
|
||||
* it will be invoked.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_GetTrayEntries
|
||||
* \sa SDL_InsertTrayEntryAt
|
||||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_SetTrayEntryCallback(SDL_TrayEntry *entry, SDL_TrayCallback callback, void *userdata);
|
||||
|
||||
/**
|
||||
* Simulate a click on a tray entry.
|
||||
*
|
||||
* \param entry The entry to activate.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
*/
|
||||
extern SDL_DECLSPEC void SDLCALL SDL_ClickTrayEntry(SDL_TrayEntry *entry);
|
||||
|
||||
/**
|
||||
* Destroys a tray object.
|
||||
*
|
||||
@@ -395,7 +404,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_SetTrayEntryCallback(SDL_TrayEntry *entry,
|
||||
*
|
||||
* \param tray the tray icon to be destroyed.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_CreateTray
|
||||
*/
|
||||
@@ -407,7 +416,7 @@ extern SDL_DECLSPEC void SDLCALL SDL_DestroyTray(SDL_Tray *tray);
|
||||
* \param entry the entry for which to get the parent menu.
|
||||
* \returns the parent menu.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_InsertTrayEntryAt
|
||||
*/
|
||||
@@ -423,7 +432,7 @@ extern SDL_DECLSPEC SDL_TrayMenu *SDLCALL SDL_GetTrayEntryParent(SDL_TrayEntry *
|
||||
* \param menu the menu for which to get the parent entry.
|
||||
* \returns the parent entry, or NULL if this menu is not a submenu.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_CreateTraySubmenu
|
||||
* \sa SDL_GetTrayMenuParentTray
|
||||
@@ -440,7 +449,7 @@ extern SDL_DECLSPEC SDL_TrayEntry *SDLCALL SDL_GetTrayMenuParentEntry(SDL_TrayMe
|
||||
* \param menu the menu for which to get the parent enttrayry.
|
||||
* \returns the parent tray, or NULL if this menu is a submenu.
|
||||
*
|
||||
* \since This function is available since SDL 3.2.0.
|
||||
* \since This function is available since SDL 3.1.8.
|
||||
*
|
||||
* \sa SDL_CreateTrayMenu
|
||||
* \sa SDL_GetTrayMenuParentEntry
|
||||
|
||||
2
Source/ThirdParty/SDL/SDL3/SDL_version.h
vendored
2
Source/ThirdParty/SDL/SDL3/SDL_version.h
vendored
@@ -62,7 +62,7 @@ extern "C" {
|
||||
*
|
||||
* \since This macro is available since SDL 3.1.3.
|
||||
*/
|
||||
#define SDL_MICRO_VERSION 7
|
||||
#define SDL_MICRO_VERSION 9
|
||||
|
||||
/**
|
||||
* This macro turns the version numbers into a numeric value.
|
||||
|
||||
@@ -88,8 +88,8 @@ namespace Flax.Deps.Dependencies
|
||||
Path.Combine(root, "include", "SDL3"),
|
||||
};
|
||||
|
||||
//CloneGitRepoFastSince(root, "https://github.com/libsdl-org/SDL", new DateTime(2025, 01, 06));
|
||||
//GitResetToCommit(root, "8ec576ddabdc7edfd68e7a8a3214e84e4026328d");
|
||||
CloneGitRepoFastSince(root, "https://github.com/libsdl-org/SDL", new DateTime(2025, 01, 10));
|
||||
GitResetToCommit(root, "82125ec1d888e95f838b3cd683dfc8aa54013371");
|
||||
|
||||
foreach (var platform in options.Platforms)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user