49 lines
892 B
C++
49 lines
892 B
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,
|
|
SET_WINDOW_TITLE_ID,
|
|
INVALIDATE_ID,
|
|
};
|
|
|
|
struct CreateWindowRequest
|
|
{
|
|
using ResponseType = CreateWindowResponse;
|
|
static constexpr u8 id = CREATE_WINDOW_ID;
|
|
|
|
ui::Rect rect;
|
|
};
|
|
|
|
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;
|
|
};
|
|
}
|