mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:27:43 +00:00
Let's use the existing Rect and Color types in the GUI API.
Any type that doesn't depend on indirect data can probably be used here.
This commit is contained in:
parent
b2d86b7597
commit
f7261d7b26
4 changed files with 68 additions and 23 deletions
|
@ -1,13 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
// GUI system call API types.
|
||||
#include <Widgets/Color.h>
|
||||
#include <Widgets/Rect.h>
|
||||
|
||||
struct GUI_Rect {
|
||||
int x;
|
||||
int y;
|
||||
int width;
|
||||
int height;
|
||||
};
|
||||
// GUI system call API types.
|
||||
|
||||
struct GUI_WindowFlags { enum {
|
||||
Visible = 1 << 0,
|
||||
|
@ -16,9 +12,9 @@ struct GUI_WindowFlags { enum {
|
|||
typedef unsigned GUI_Color;
|
||||
|
||||
struct GUI_CreateWindowParameters {
|
||||
GUI_Rect rect;
|
||||
GUI_Color background_color;
|
||||
unsigned flags;
|
||||
Rect rect;
|
||||
Color background_color;
|
||||
unsigned flags { 0 };
|
||||
char title[128];
|
||||
};
|
||||
|
||||
|
@ -29,9 +25,9 @@ enum class GUI_WidgetType : unsigned {
|
|||
|
||||
struct GUI_CreateWidgetParameters {
|
||||
GUI_WidgetType type;
|
||||
GUI_Rect rect;
|
||||
GUI_Color background_color;
|
||||
bool opaque;
|
||||
unsigned flags;
|
||||
Rect rect;
|
||||
Color background_color;
|
||||
bool opaque { true };
|
||||
unsigned flags { 0 };
|
||||
char text[256];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue