From bee6cb81cad42d6dae18810d765a56a8d9a76a36 Mon Sep 17 00:00:00 2001 From: NishiOwO Date: Mon, 15 Dec 2025 11:07:58 +0900 Subject: [PATCH] now ACTUALLY format --- include/Mw/BaseTypes.h | 4 ++-- src/backend/wayland.c | 12 ++++++------ src/widget/opengl.c | 3 +-- src/widget/scrollbar.c | 8 ++++---- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/include/Mw/BaseTypes.h b/include/Mw/BaseTypes.h index 1014869..ca718ea 100644 --- a/include/Mw/BaseTypes.h +++ b/include/Mw/BaseTypes.h @@ -58,8 +58,8 @@ typedef unsigned long MwU64; #ifdef MW_OTHER_TYPES_DEFINED #undef MW_OTHER_TYPES_DEFINED #else -typedef int MwI32; -typedef unsigned int MwU32; +typedef int MwI32; +typedef unsigned int MwU32; typedef short MwI16; typedef unsigned short MwU16; diff --git a/src/backend/wayland.c b/src/backend/wayland.c index b034ab4..48ce0c4 100644 --- a/src/backend/wayland.c +++ b/src/backend/wayland.c @@ -38,18 +38,18 @@ static void new_protocol(void* data, struct wl_registry* registry, /* `wl_registry.global_remove` callback */ static void protocol_removed(void* data, struct wl_registry* registry, - MwU32 name){ + MwU32 name) { }; /* `wl_pointer.enter` callback */ static void pointer_enter(void* data, struct wl_pointer* wl_pointer, MwU32 serial, struct wl_surface* surface, wl_fixed_t surface_x, - wl_fixed_t surface_y){}; + wl_fixed_t surface_y) {}; /* `wl_pointer.leave` callback */ static void pointer_leave(void* data, struct wl_pointer* wl_pointer, MwU32 serial, - struct wl_surface* surface){}; + struct wl_surface* surface) {}; /* `wl_pointer.motion` callback */ static void pointer_motion(void* data, struct wl_pointer* wl_pointer, MwU32 time, @@ -97,7 +97,7 @@ static void pointer_button(void* data, struct wl_pointer* wl_pointer, MwU32 seri /* `wl_pointer.axis` callback */ static void pointer_axis(void* data, struct wl_pointer* wl_pointer, MwU32 time, - MwU32 axis, wl_fixed_t value){}; + MwU32 axis, wl_fixed_t value) {}; struct wl_pointer_listener pointer_listener = { .enter = pointer_enter, @@ -266,7 +266,7 @@ static void keyboard_modifiers(void* data, MwU32 mods_depressed, MwU32 mods_latched, MwU32 mods_locked, - MwU32 group){}; + MwU32 group) {}; struct wl_keyboard_listener keyboard_listener = { .keymap = keyboard_keymap, @@ -278,7 +278,7 @@ struct wl_keyboard_listener keyboard_listener = { /* `wl_seat.name` callback */ static void -wl_seat_name(void* data, struct wl_seat* wl_seat, const char* name){}; +wl_seat_name(void* data, struct wl_seat* wl_seat, const char* name) {}; /* `wl_seat.capabilities` callback */ static void wl_seat_capabilities(void* data, struct wl_seat* wl_seat, diff --git a/src/widget/opengl.c b/src/widget/opengl.c index 8c3b1ac..9552ae4 100644 --- a/src/widget/opengl.c +++ b/src/widget/opengl.c @@ -89,8 +89,7 @@ static int create(MwWidget handle) { attribs[3] = 24; attribs[4] = None; - while(glpath[glincr] != NULL && (o->lib = MwDynamicOpen(glpath[glincr++])) == NULL) - ; + while(glpath[glincr] != NULL && (o->lib = MwDynamicOpen(glpath[glincr++])) == NULL); o->glXChooseVisual = (MWglXChooseVisual)MwDynamicSymbol(o->lib, "glXChooseVisual"); o->glXCreateContext = (MWglXCreateContext)MwDynamicSymbol(o->lib, "glXCreateContext"); diff --git a/src/widget/scrollbar.c b/src/widget/scrollbar.c index 4058c81..e00d0b5 100644 --- a/src/widget/scrollbar.c +++ b/src/widget/scrollbar.c @@ -144,7 +144,7 @@ static void draw(MwWidget handle) { } static void mouse_move(MwWidget handle) { - int or = MwGetInteger(handle, MwNorientation); + int or = MwGetInteger(handle, MwNorientation); scrollbar_t* scr = handle->internal; if(!handle->pressed) return; @@ -172,9 +172,9 @@ static void mouse_move(MwWidget handle) { } static void mouse_down(MwWidget handle, void* ptr) { - int ww = MwGetInteger(handle, MwNwidth); - int wh = MwGetInteger(handle, MwNheight); - int or = MwGetInteger(handle, MwNorientation); + int ww = MwGetInteger(handle, MwNwidth); + int wh = MwGetInteger(handle, MwNheight); + int or = MwGetInteger(handle, MwNorientation); scrollbar_t* scr = handle->internal; MwLLMouse* m = ptr;