git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@39 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-09-29 00:10:20 +00:00
parent b518cee5cc
commit cad1113643
15 changed files with 46 additions and 46 deletions

View File

@@ -1,5 +1,5 @@
/* $Id$ */
#include <Mw/Mw.h>
#include <Mw/Milsko.h>
static void create(MwWidget handle) {
MwSetDefault(handle);

View File

@@ -1,5 +1,5 @@
/* $Id$ */
#include <Mw/Mw.h>
#include <Mw/Milsko.h>
#include "stb_ds.h"
@@ -10,14 +10,14 @@ static void lldrawhandler(MwLL handle) {
static void lluphandler(MwLL handle) {
MwWidget h = (MwWidget)handle->user;
h->pressed = 0;
h->pressed = 0;
MwDispatch(h, click);
}
static void lldownhandler(MwLL handle) {
MwWidget h = (MwWidget)handle->user;
h->pressed = 1;
h->pressed = 1;
}
MwWidget MwCreateWidget(MwClass class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height) {
@@ -53,7 +53,7 @@ MwWidget MwCreateWidget(MwClass class, const char* name, MwWidget parent, int x,
MwWidget MwVaCreateWidget(MwClass class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height, ...) {
MwWidget h;
va_list va;
va_list va;
va_start(va, height);
h = MwVaListCreateWidget(class, name, parent, x, y, width, height, va);
@@ -204,7 +204,7 @@ void MwVaListApply(MwWidget handle, va_list va) {
MwSetText(handle, key, t);
} else if(key[0] == 'C') {
MwUserHandler h = va_arg(va, MwUserHandler);
int ind;
int ind;
shput(handle->handler, key, h);
ind = shgeti(handle->handler, key);

View File

@@ -1,4 +1,4 @@
/* $Id$ */
#include <Mw/Mw.h>
#include <Mw/Milsko.h>
const char* MwDefaultBackground = "#ddd";

View File

@@ -1,5 +1,5 @@
/* $Id$ */
#include <Mw/Mw.h>
#include <Mw/Milsko.h>
static int hex(const char* txt, int len) {
int i;
@@ -61,9 +61,9 @@ void MwDrawRect(MwWidget handle, MwRect* rect, MwLLColor color) {
}
void MwDrawFrame(MwWidget handle, MwRect* rect, MwLLColor color, int invert) {
MwPoint p[6];
const int diff = 128;
const int border = 2;
MwPoint p[6];
const int diff = 128;
const int border = 2;
MwLLColor darker = MwLLAllocColor(handle->lowlevel, color->red - diff, color->green - diff, color->blue - diff);
MwLLColor lighter = MwLLAllocColor(handle->lowlevel, color->red + diff, color->green + diff, color->blue + diff);

View File

@@ -1,2 +1,2 @@
/* $Id$ */
#include <Mw/Mw.h>
#include <Mw/Milsko.h>

View File

@@ -1,5 +1,5 @@
/* $Id$ */
#include <Mw/Mw.h>
#include <Mw/Milsko.h>
void MwLLCreateCommon(MwLL handle) {
handle->handler = malloc(sizeof(*handle->handler));

View File

@@ -1,5 +1,5 @@
/* $Id$ */
#include <Mw/Mw.h>
#include <Mw/Milsko.h>
static void create(MwWidget handle) {
MwSetDefault(handle);
@@ -7,7 +7,7 @@ static void create(MwWidget handle) {
static void draw(MwWidget handle) {
MwLLColor c = MwParseColor(handle, MwGetText(handle, MwNbackground));
MwRect r;
MwRect r;
r.x = 0;
r.y = 0;

View File

@@ -1,10 +1,10 @@
/* $Id$ */
#include <Mw/Mw.h>
#include <Mw/Milsko.h>
static unsigned long mask = ExposureMask | StructureNotifyMask | ButtonPressMask | ButtonReleaseMask;
MwLL MwLLCreate(MwLL parent, int x, int y, int width, int height) {
MwLL r;
MwLL r;
Window p;
Window root;
unsigned int border, depth;
@@ -56,7 +56,7 @@ void MwLLPolygon(MwLL handle, MwPoint* points, int points_count, MwLLColor color
MwLLColor MwLLAllocColor(MwLL handle, int r, int g, int b) {
MwLLColor c = malloc(sizeof(*c));
XColor xc;
XColor xc;
if(r > 255) r = 255;
if(g > 255) g = 255;