apio
140910763e
All checks were successful
Build and test / build (push) Successful in 1m56s
Why are command-line utilities stored in "apps"? And why are apps like "editor" or "terminal" top-level directories? Command-line utilities now go in "utils". GUI stuff now goes in "gui". This includes: libui -> gui/libui, wind -> gui/wind, GUI apps -> gui/apps, editor&terminal -> gui/apps... System services go in "system".
97 lines
1.8 KiB
C++
97 lines
1.8 KiB
C++
/**
|
|
* @file ipc/Server.h
|
|
* @author apio (cloudapio.eu)
|
|
* @brief IPC message definitions for UI messages sent to the server.
|
|
*
|
|
* @copyright Copyright (c) 2023, the Luna authors.
|
|
*
|
|
*/
|
|
|
|
#pragma once
|
|
#include <os/IPC.h>
|
|
#include <ui/Color.h>
|
|
#include <ui/Rect.h>
|
|
#include <ui/ipc/Client.h>
|
|
|
|
namespace ui
|
|
{
|
|
enum ServerMessages : u8
|
|
{
|
|
IPC_ENUM_SERVER(ui),
|
|
CREATE_WINDOW_ID,
|
|
REMOVE_SHM_ID,
|
|
SET_WINDOW_TITLE_ID,
|
|
INVALIDATE_ID,
|
|
CLOSE_WINDOW_ID,
|
|
GET_SCREEN_RECT_ID,
|
|
SET_TITLEBAR_HEIGHT_ID,
|
|
SET_SPECIAL_WINDOW_ATTRIBUTES_ID,
|
|
};
|
|
|
|
struct CreateWindowRequest
|
|
{
|
|
using ResponseType = CreateWindowResponse;
|
|
static constexpr u8 ID = CREATE_WINDOW_ID;
|
|
|
|
ui::Rect rect;
|
|
};
|
|
|
|
struct RemoveSharedMemoryRequest
|
|
{
|
|
static constexpr u8 ID = REMOVE_SHM_ID;
|
|
|
|
int window;
|
|
};
|
|
|
|
struct SetWindowTitleRequest
|
|
{
|
|
static constexpr u8 ID = SET_WINDOW_TITLE_ID;
|
|
|
|
int window;
|
|
IPC_STRING(title);
|
|
};
|
|
|
|
struct InvalidateRequest
|
|
{
|
|
static constexpr u8 ID = INVALIDATE_ID;
|
|
|
|
int window;
|
|
};
|
|
|
|
struct CloseWindowRequest
|
|
{
|
|
static constexpr u8 ID = CLOSE_WINDOW_ID;
|
|
|
|
int window;
|
|
};
|
|
|
|
struct GetScreenRectRequest
|
|
{
|
|
using ResponseType = GetScreenRectResponse;
|
|
static constexpr u8 ID = GET_SCREEN_RECT_ID;
|
|
|
|
int _shadow; // Unused.
|
|
};
|
|
|
|
struct SetTitlebarHeightRequest
|
|
{
|
|
static constexpr u8 ID = SET_TITLEBAR_HEIGHT_ID;
|
|
|
|
int window;
|
|
int height;
|
|
};
|
|
|
|
enum WindowAttributes : u8
|
|
{
|
|
UNFOCUSEABLE = 1,
|
|
};
|
|
|
|
struct SetSpecialWindowAttributesRequest
|
|
{
|
|
static constexpr u8 ID = SET_SPECIAL_WINDOW_ATTRIBUTES_ID;
|
|
|
|
int window;
|
|
WindowAttributes attributes;
|
|
};
|
|
}
|