git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@16 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-09-28 09:08:53 +00:00
parent 09ae765d0a
commit 5170d6c0db
6 changed files with 31 additions and 0 deletions

View File

@@ -77,6 +77,12 @@ void MilskoSetInteger(HMILSKO handle, const char* key, int n) {
}
}
void MilskoSetText(HMILSKO handle, const char* key, const char* value) {
if(strcmp(key, MilskoNtitle) == 0) {
MilskoLLSetTitle(handle->lowlevel, value);
}
}
void MilskoApply(HMILSKO handle, ...) {
va_list va;
char* key;
@@ -86,6 +92,9 @@ void MilskoApply(HMILSKO handle, ...) {
if(key[0] == 'I') {
int n = va_arg(va, int);
MilskoSetInteger(handle, key, n);
} else if(key[0] == 'S') {
char* t = va_arg(va, char*);
MilskoSetText(handle, key, t);
}
}
va_end(va);

View File

@@ -108,3 +108,7 @@ void MilskoLLNextEvent(HMILSKOLL handle) {
void MilskoLLSleep(int ms) {
usleep(ms * 1000);
}
MILSKODECL void MilskoLLSetTitle(HMILSKOLL handle, const char* title) {
XSetStandardProperties(handle->display, handle->window, title, "Milsko Widget Toolkit", None, (char**)NULL, 0, NULL);
}