feat: move Files to its own process; add window server messaging (multi-format clipboard, drag and drop), undo/redo, sidebar, breadcrumbs, thumbnails, file type icons, New menu and proper text fields
This commit is contained in:
1 parent
07191b1286
commit
d3e49a925d
66 files changed
+6855
-905
No files matched your search
@@ -2,7 +2,9 @@
|
||||
* Window.hpp
|
||||
* SYS_WINCREATE, SYS_WINDESTROY, SYS_WINPRESENT, SYS_WINPOLL,
|
||||
* SYS_WINENUM, SYS_WINMAP, SYS_WINSENDEVENT, SYS_WINRESIZE,
|
||||
* SYS_WINSETCURSOR, SYS_WINSETFLAGS, SYS_WINSETSCALE, SYS_WINGETSCALE syscalls
|
||||
* SYS_WINSETCURSOR, SYS_WINSETFLAGS, SYS_WINSETSCALE, SYS_WINGETSCALE syscalls,
|
||||
* and window server messaging: SYS_WIN_REQUEST, SYS_WIN_REQUEST_POLL,
|
||||
* SYS_WIN_DRAG_BEGIN, SYS_WIN_DRAG_FORMATS, SYS_WIN_DRAG_GET_DATA
|
||||
* Copyright (c) 2026 Daniel Hammer
|
||||
*/
|
||||
|
||||
@@ -92,4 +94,41 @@ namespace montauk::abi {
|
||||
static int Sys_WinGetScale() {
|
||||
return WinServer::GetScale();
|
||||
}
|
||||
|
||||
// Any app may post requests, but only about its own windows (checked in
|
||||
// WinServer); only the compositor may read them back.
|
||||
static int Sys_WinRequest(int windowId, const WinRequest* request) {
|
||||
if (request == nullptr) return InvalidArgument;
|
||||
WinRequest copy = *request;
|
||||
return WinServer::PostRequest(windowId, Sched::GetCurrentPid(), copy);
|
||||
}
|
||||
|
||||
static int Sys_WinRequestPoll(WinRequest* out) {
|
||||
if (!Sched::HasCapability(CAP_COMPOSITOR)) return CapabilityDenied;
|
||||
if (out == nullptr) return InvalidArgument;
|
||||
return WinServer::PollRequest(out);
|
||||
}
|
||||
|
||||
static int Sys_WinDragBegin(int windowId, const WinDragBegin* info,
|
||||
const TransferItem* items, uint32_t count) {
|
||||
if (info == nullptr) return InvalidArgument;
|
||||
WinDragBegin infoCopy = *info;
|
||||
DataTransfer::Transfer transfer;
|
||||
int rc = DataTransfer::BuildFromUser(items, count, transfer);
|
||||
if (rc != Success) return rc;
|
||||
return WinServer::DragBegin(windowId, Sched::GetCurrentPid(),
|
||||
Sched::HasCapability(CAP_COMPOSITOR), infoCopy, transfer);
|
||||
}
|
||||
|
||||
static int Sys_WinDragFormats(uint32_t serial, TransferFormatInfo* out, uint32_t max) {
|
||||
return WinServer::DragFormats(serial, Sched::GetCurrentPid(),
|
||||
Sched::HasCapability(CAP_COMPOSITOR), out, max);
|
||||
}
|
||||
|
||||
static int Sys_WinDragGetData(uint32_t serial, const char* mime, void* buffer,
|
||||
uint32_t bufferLen, uint32_t* outLen) {
|
||||
return WinServer::DragGetData(serial, Sched::GetCurrentPid(),
|
||||
Sched::HasCapability(CAP_COMPOSITOR), mime,
|
||||
buffer, bufferLen, outLen);
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user