wip
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
Nishi 2026-04-29 15:14:38 +09:00
commit 150581e716
6 changed files with 29 additions and 13 deletions

View file

@ -2,7 +2,8 @@
#include "../../external/stb_ds.h"
MwApplication::MwApplication(MwRect rc, MwLL handle) : BApplication("application/milsko-generic") {
MwApplication::MwApplication(MwRect rc, MwLL handle)
: BApplication("application/milsko-generic") {
BScreen* scr = new BScreen();
float x = (scr->Frame().Width() - rc.width) / 2;
float y = (scr->Frame().Height() - rc.height) / 2;
@ -47,7 +48,8 @@ void MwApplication::MessageReceived(BMessage* message) {
}
}
MwView::MwView(MwLL handle, BRect frame, uint32 resizingMode, uint32 flags) : BView(frame, NULL, resizingMode, flags | B_FRAME_EVENTS) {
MwView::MwView(MwLL handle, BRect frame, uint32 resizingMode, uint32 flags)
: BView(frame, NULL, resizingMode, flags | B_FRAME_EVENTS) {
this->handle = handle;
this->locker = new BLocker();
@ -185,7 +187,7 @@ void MwView::MessageReceived(BMessage* message) {
void MwView::PostMessage(BMessage* message) {
BMessage copy = *message;
MwLL top = this->handle;
MwLL top = this->handle;
while(top->haiku.parent != NULL) top = top->haiku.parent;
@ -307,7 +309,8 @@ void MwView::SetColor(MwLLColor color) {
this->PostMessage(&msg);
}
MwWindow::MwWindow(BRect frame, window_type type, uint32 flags) : BWindow(frame, "Milsko", type, flags) {
MwWindow::MwWindow(BRect frame, window_type type, uint32 flags)
: BWindow(frame, "Milsko", type, flags) {
}
void MwWindow::MessageReceived(BMessage* message) {

View file

@ -420,8 +420,8 @@ static void redrawIfNeeded(MwWidget handle, int row) {
static int mwListBoxSetImpl(MwWidget handle, int row, int col, const char* text) {
MwListBox lb = handle->internal;
MwListBoxEntry entry;
char* t = text == NULL ? NULL : MwStringDuplicate(text);
int new = 0;
char* t = text == NULL ? NULL : MwStringDuplicate(text);
int new = 0;
if(row == -1) row = arrlen(lb->list);
entry.name = NULL;
@ -449,7 +449,7 @@ static int mwListBoxSetImpl(MwWidget handle, int row, int col, const char* text)
static void mwListBoxSetIconImpl(MwWidget handle, int index, MwLLPixmap icon) {
MwListBox lb = handle->internal;
MwListBoxEntry entry;
int new = 0;
int new = 0;
if(index == -1) index = arrlen(lb->list);
entry.name = NULL;

View file

@ -58,9 +58,9 @@ static void draw(MwWidget handle) {
MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground));
MwLLColor dark = MwLightenColor(handle, base, -64, -64, -64);
MwScrollBar scr = handle->internal;
int or;
int uy, dy, ux, dx;
MwLLPixmap bgpx = MwGetVoid(handle, MwNbackgroundPixmap);
int or ;
int uy, dy, ux, dx;
MwLLPixmap bgpx = MwGetVoid(handle, MwNbackgroundPixmap);
r.x = 0;
r.y = 0;