libui: Add CreateWindow IPC message definitions

This commit is contained in:
apio 2023-08-14 18:15:10 +02:00
parent a2fd838f5d
commit ac5dd05d2e
Signed by: apio
GPG Key ID: B8A7D06E42258954
3 changed files with 62 additions and 0 deletions

View File

@ -4,6 +4,8 @@ file(GLOB HEADERS include/ui/*.h)
set(SOURCES set(SOURCES
${HEADERS} ${HEADERS}
include/ui/ipc/Server.h
include/ui/ipc/Client.h
src/Canvas.cpp src/Canvas.cpp
src/Rect.cpp src/Rect.cpp
src/Font.cpp src/Font.cpp

View File

@ -0,0 +1,27 @@
/**
* @file ipc/Client.h
* @author apio (cloudapio.eu)
* @brief IPC message definitions for UI messages sent to the client.
*
* @copyright Copyright (c) 2023, the Luna authors.
*
*/
#pragma once
#include <os/IPC.h>
namespace ui
{
enum ClientMessages : u8
{
IPC_ENUM_CLIENT(ui),
CREATE_WINDOW_RESPONSE_ID,
};
struct CreateWindowResponse
{
static constexpr u8 id = CREATE_WINDOW_RESPONSE_ID;
int window;
};
}

View File

@ -0,0 +1,33 @@
/**
* @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,
};
struct CreateWindowRequest
{
using ResponseType = CreateWindowResponse;
static constexpr u8 id = CREATE_WINDOW_ID;
ui::Rect rect;
IPC_STRING(name);
ui::Color color;
};
}