mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-09 02:43:30 +00:00
now ACTUALLY format
This commit is contained in:
@@ -58,8 +58,8 @@ typedef unsigned long MwU64;
|
|||||||
#ifdef MW_OTHER_TYPES_DEFINED
|
#ifdef MW_OTHER_TYPES_DEFINED
|
||||||
#undef MW_OTHER_TYPES_DEFINED
|
#undef MW_OTHER_TYPES_DEFINED
|
||||||
#else
|
#else
|
||||||
typedef int MwI32;
|
typedef int MwI32;
|
||||||
typedef unsigned int MwU32;
|
typedef unsigned int MwU32;
|
||||||
|
|
||||||
typedef short MwI16;
|
typedef short MwI16;
|
||||||
typedef unsigned short MwU16;
|
typedef unsigned short MwU16;
|
||||||
|
|||||||
@@ -38,18 +38,18 @@ static void new_protocol(void* data, struct wl_registry* registry,
|
|||||||
/* `wl_registry.global_remove` callback */
|
/* `wl_registry.global_remove` callback */
|
||||||
static void protocol_removed(void* data,
|
static void protocol_removed(void* data,
|
||||||
struct wl_registry* registry,
|
struct wl_registry* registry,
|
||||||
MwU32 name){
|
MwU32 name) {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* `wl_pointer.enter` callback */
|
/* `wl_pointer.enter` callback */
|
||||||
static void pointer_enter(void* data, struct wl_pointer* wl_pointer, MwU32 serial,
|
static void pointer_enter(void* data, struct wl_pointer* wl_pointer, MwU32 serial,
|
||||||
struct wl_surface* surface, wl_fixed_t surface_x,
|
struct wl_surface* surface, wl_fixed_t surface_x,
|
||||||
wl_fixed_t surface_y){};
|
wl_fixed_t surface_y) {};
|
||||||
|
|
||||||
/* `wl_pointer.leave` callback */
|
/* `wl_pointer.leave` callback */
|
||||||
static void pointer_leave(void* data, struct wl_pointer* wl_pointer, MwU32 serial,
|
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 */
|
/* `wl_pointer.motion` callback */
|
||||||
static void pointer_motion(void* data, struct wl_pointer* wl_pointer, MwU32 time,
|
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 */
|
/* `wl_pointer.axis` callback */
|
||||||
static void pointer_axis(void* data, struct wl_pointer* wl_pointer, MwU32 time,
|
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 = {
|
struct wl_pointer_listener pointer_listener = {
|
||||||
.enter = pointer_enter,
|
.enter = pointer_enter,
|
||||||
@@ -266,7 +266,7 @@ static void keyboard_modifiers(void* data,
|
|||||||
MwU32 mods_depressed,
|
MwU32 mods_depressed,
|
||||||
MwU32 mods_latched,
|
MwU32 mods_latched,
|
||||||
MwU32 mods_locked,
|
MwU32 mods_locked,
|
||||||
MwU32 group){};
|
MwU32 group) {};
|
||||||
|
|
||||||
struct wl_keyboard_listener keyboard_listener = {
|
struct wl_keyboard_listener keyboard_listener = {
|
||||||
.keymap = keyboard_keymap,
|
.keymap = keyboard_keymap,
|
||||||
@@ -278,7 +278,7 @@ struct wl_keyboard_listener keyboard_listener = {
|
|||||||
|
|
||||||
/* `wl_seat.name` callback */
|
/* `wl_seat.name` callback */
|
||||||
static void
|
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 */
|
/* `wl_seat.capabilities` callback */
|
||||||
static void wl_seat_capabilities(void* data, struct wl_seat* wl_seat,
|
static void wl_seat_capabilities(void* data, struct wl_seat* wl_seat,
|
||||||
|
|||||||
@@ -89,8 +89,7 @@ static int create(MwWidget handle) {
|
|||||||
attribs[3] = 24;
|
attribs[3] = 24;
|
||||||
attribs[4] = None;
|
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->glXChooseVisual = (MWglXChooseVisual)MwDynamicSymbol(o->lib, "glXChooseVisual");
|
||||||
o->glXCreateContext = (MWglXCreateContext)MwDynamicSymbol(o->lib, "glXCreateContext");
|
o->glXCreateContext = (MWglXCreateContext)MwDynamicSymbol(o->lib, "glXCreateContext");
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ static void draw(MwWidget handle) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void mouse_move(MwWidget handle) {
|
static void mouse_move(MwWidget handle) {
|
||||||
int or = MwGetInteger(handle, MwNorientation);
|
int or = MwGetInteger(handle, MwNorientation);
|
||||||
scrollbar_t* scr = handle->internal;
|
scrollbar_t* scr = handle->internal;
|
||||||
|
|
||||||
if(!handle->pressed) return;
|
if(!handle->pressed) return;
|
||||||
@@ -172,9 +172,9 @@ static void mouse_move(MwWidget handle) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void mouse_down(MwWidget handle, void* ptr) {
|
static void mouse_down(MwWidget handle, void* ptr) {
|
||||||
int ww = MwGetInteger(handle, MwNwidth);
|
int ww = MwGetInteger(handle, MwNwidth);
|
||||||
int wh = MwGetInteger(handle, MwNheight);
|
int wh = MwGetInteger(handle, MwNheight);
|
||||||
int or = MwGetInteger(handle, MwNorientation);
|
int or = MwGetInteger(handle, MwNorientation);
|
||||||
scrollbar_t* scr = handle->internal;
|
scrollbar_t* scr = handle->internal;
|
||||||
MwLLMouse* m = ptr;
|
MwLLMouse* m = ptr;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user