diff options
Diffstat (limited to 'platform/x11')
| -rw-r--r-- | platform/x11/x11.c | 12 |
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); |
