libui: Add CreateWindow IPC message definitions
This commit is contained in:
parent
9125561cab
commit
1eb00eabfa
@ -4,6 +4,8 @@ file(GLOB HEADERS include/ui/*.h)
|
||||
|
||||
set(SOURCES
|
||||
${HEADERS}
|
||||
include/ui/ipc/Server.h
|
||||
include/ui/ipc/Client.h
|
||||
src/Canvas.cpp
|
||||
src/Rect.cpp
|
||||
src/Font.cpp
|
||||
|
27
libui/include/ui/ipc/Client.h
Normal file
27
libui/include/ui/ipc/Client.h
Normal 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;
|
||||
};
|
||||
}
|
33
libui/include/ui/ipc/Server.h
Normal file
33
libui/include/ui/ipc/Server.h
Normal 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;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user