From 897a153d290ed4d3647ad9e0100d1b717f580b5f Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Tue, 12 May 2026 16:41:37 -0400 Subject: 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. --- platform/x11/x11.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'platform/x11/x11.c') 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); -- cgit v1.3-2-g0d8e