aboutsummaryrefslogtreecommitdiff
path: root/platform/x11/x11.c
diff options
context:
space:
mode:
authoriamcheeseman <[email protected]>2026-05-12 16:41:37 -0400
committeriamcheeseman <[email protected]>2026-05-12 16:41:37 -0400
commit897a153d290ed4d3647ad9e0100d1b717f580b5f (patch)
tree844dee0b3b2b7d869cd8e1ba27ffb403e8d51d99 /platform/x11/x11.c
parentc1dd3ce9850fb2906aa5937b4374d1c0fc74ccf7 (diff)
typedef all structs and rename to Ada_Case
There isn't really a technical reason that I made this change. I just wanted to use Ada_Case. All types were prefixed with ty_, e.g. ty_Image.
Diffstat (limited to 'platform/x11/x11.c')
-rw-r--r--platform/x11/x11.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/platform/x11/x11.c b/platform/x11/x11.c
index 2dde168..ad85677 100644
--- a/platform/x11/x11.c
+++ b/platform/x11/x11.c
@@ -17,7 +17,7 @@
#define SEC2NANO ((uint64_t)1000000000)
-struct x11_platform {
+typedef struct {
Display *dis;
Window root;
Window win;
@@ -28,9 +28,9 @@ struct x11_platform {
bool should_close;
uint64_t initial_time;
-};
+} X11_Platform;
-struct x11_platform p;
+X11_Platform p;
static
int err_handler(Display *dis, XErrorEvent *ev)
@@ -46,7 +46,7 @@ int err_handler(Display *dis, XErrorEvent *ev)
return 0;
}
-void ty_platform_init(struct ty_ctx *ctx)
+void ty_platform_init(ty_Ctx *ctx)
{
XSetErrorHandler(err_handler);
@@ -101,7 +101,7 @@ void ty_platform_deinit(void)
}
static
-void display_image(struct ty_image img)
+void display_image(ty_Image img)
{
size_t size = img.width * img.height;
// Don't use ty_alloc cause it will be owned and freed by Xlib
@@ -157,7 +157,7 @@ void handle_client_msg(XEvent ev)
p.should_close = true;
}
-void ty_platform_frame(struct ty_image img)
+void ty_platform_frame(ty_Image img)
{
XPending(p.dis);