libos+libui+wind: Use uppercase for static struct IDs to avoid confusion with fields
This commit is contained in:
parent
57761df341
commit
c99c2e4fe3
@ -54,7 +54,7 @@ namespace os
|
|||||||
*/
|
*/
|
||||||
template <typename Client, typename T> Result<void> send_async(Client& client, const T& message)
|
template <typename Client, typename T> Result<void> send_async(Client& client, const T& message)
|
||||||
{
|
{
|
||||||
u8 id = T::id;
|
u8 id = T::ID;
|
||||||
TRY(client.send_typed(id));
|
TRY(client.send_typed(id));
|
||||||
TRY(client.send_typed(message));
|
TRY(client.send_typed(message));
|
||||||
return {};
|
return {};
|
||||||
@ -90,7 +90,7 @@ namespace os
|
|||||||
Result<ResponseType> send_sync(os::LocalClient& client, const T& message,
|
Result<ResponseType> send_sync(os::LocalClient& client, const T& message,
|
||||||
decltype(handle_ipc_client_event) handler = handle_ipc_client_event)
|
decltype(handle_ipc_client_event) handler = handle_ipc_client_event)
|
||||||
{
|
{
|
||||||
u8 id = T::id;
|
u8 id = T::ID;
|
||||||
TRY(client.send_typed(id));
|
TRY(client.send_typed(id));
|
||||||
TRY(client.send_typed(message));
|
TRY(client.send_typed(message));
|
||||||
|
|
||||||
@ -115,7 +115,7 @@ namespace os
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response_id != ResponseType::id)
|
if (response_id != ResponseType::ID)
|
||||||
{
|
{
|
||||||
TRY(handler(client, response_id));
|
TRY(handler(client, response_id));
|
||||||
max_other_messages--;
|
max_other_messages--;
|
||||||
|
@ -20,7 +20,7 @@ namespace ui
|
|||||||
|
|
||||||
struct CreateWindowResponse
|
struct CreateWindowResponse
|
||||||
{
|
{
|
||||||
static constexpr u8 id = CREATE_WINDOW_RESPONSE_ID;
|
static constexpr u8 ID = CREATE_WINDOW_RESPONSE_ID;
|
||||||
|
|
||||||
int window;
|
int window;
|
||||||
IPC_STRING(shm_path);
|
IPC_STRING(shm_path);
|
||||||
|
@ -26,14 +26,14 @@ namespace ui
|
|||||||
struct CreateWindowRequest
|
struct CreateWindowRequest
|
||||||
{
|
{
|
||||||
using ResponseType = CreateWindowResponse;
|
using ResponseType = CreateWindowResponse;
|
||||||
static constexpr u8 id = CREATE_WINDOW_ID;
|
static constexpr u8 ID = CREATE_WINDOW_ID;
|
||||||
|
|
||||||
ui::Rect rect;
|
ui::Rect rect;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SetWindowTitleRequest
|
struct SetWindowTitleRequest
|
||||||
{
|
{
|
||||||
static constexpr u8 id = SET_WINDOW_TITLE_ID;
|
static constexpr u8 ID = SET_WINDOW_TITLE_ID;
|
||||||
|
|
||||||
int window;
|
int window;
|
||||||
IPC_STRING(title);
|
IPC_STRING(title);
|
||||||
@ -41,7 +41,7 @@ namespace ui
|
|||||||
|
|
||||||
struct InvalidateRequest
|
struct InvalidateRequest
|
||||||
{
|
{
|
||||||
static constexpr u8 id = INVALIDATE_ID;
|
static constexpr u8 ID = INVALIDATE_ID;
|
||||||
|
|
||||||
int window;
|
int window;
|
||||||
};
|
};
|
||||||
|
@ -64,7 +64,7 @@ static Result<u32*> create_shm_region(const char* path, int* outfd, ui::Rect rec
|
|||||||
if (rc.error() == EAGAIN) \
|
if (rc.error() == EAGAIN) \
|
||||||
{ \
|
{ \
|
||||||
client.rpc_in_progress = true; \
|
client.rpc_in_progress = true; \
|
||||||
client.rpc_id = decltype(request)::id; \
|
client.rpc_id = decltype(request)::ID; \
|
||||||
return {}; \
|
return {}; \
|
||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
|
Loading…
Reference in New Issue
Block a user