mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-06 01:19:44 +00:00
example
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@16 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user