c89-ification

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@387 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-17 00:16:02 +00:00
parent f4eed938cf
commit 758ae46138
8 changed files with 80 additions and 30 deletions

View File

@@ -117,13 +117,17 @@ static void key(MwWidget handle, int code) {
MwForceRender(handle);
}
static void prop_change(MwWidget handle, const char* prop) {
if(strcmp(prop, MwNtext) == 0) MwForceRender(handle);
}
MwClassRec MwEntryClassRec = {
create, /* create */
destroy, /* destroy */
draw, /* draw */
NULL, /* click */
NULL, /* parent_resize */
NULL, /* prop_change */
prop_change, /* prop_change */
NULL, /* mouse_move */
MwForceRender2, /* mouse_up */
MwForceRender2, /* mouse_down */

View File

@@ -126,17 +126,21 @@ static void mouse_down(MwWidget handle, void* ptr) {
MwForceRender(handle);
}
static void prop_change(MwWidget handle, const char* prop) {
if(strcmp(prop, MwNtext) == 0) MwForceRender(handle);
}
MwClassRec MwNumberEntryClassRec = {
create, /* create */
destroy, /* destroy */
draw, /* draw */
NULL, /* click */
NULL, /* parent_resize */
NULL, /* prop_change */
mouse_move, /* mouse_move */
mouse_up, /* mouse_up */
mouse_down, /* mouse_down */
key, /* key */
create, /* create */
destroy, /* destroy */
draw, /* draw */
NULL, /* click */
NULL, /* parent_resize */
prop_change, /* prop_change */
mouse_move, /* mouse_move */
mouse_up, /* mouse_up */
mouse_down, /* mouse_down */
key, /* key */
NULL,
NULL,
NULL,

View File

@@ -132,7 +132,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;
@@ -160,9 +160,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;