new constant
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@252 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
0c28c9d104
commit
0fd866977b
14 changed files with 65 additions and 42 deletions
|
|
@ -20,6 +20,9 @@
|
||||||
<dd>
|
<dd>
|
||||||
<a href="#Mw_Constants_h__MwALIGNMENT">MwALIGNMENT</a>
|
<a href="#Mw_Constants_h__MwALIGNMENT">MwALIGNMENT</a>
|
||||||
</dd>
|
</dd>
|
||||||
|
<dd>
|
||||||
|
<a href="#Mw_Constants_h___define_MwDEFAULT_0x0fffffff">#define MwDEFAULT 0x0fffffff</a>
|
||||||
|
</dd>
|
||||||
<dt>
|
<dt>
|
||||||
<a href="#Mw_Core_h">Mw/Core.h</a>
|
<a href="#Mw_Core_h">Mw/Core.h</a>
|
||||||
</dt>
|
</dt>
|
||||||
|
|
@ -398,6 +401,13 @@
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
<hr>
|
<hr>
|
||||||
|
<pre id="Mw_Constants_h___define_MwDEFAULT_0x0fffffff">#<B><FONT COLOR="#5F9EA0">define</FONT></B> <FONT COLOR="#B8860B">MwDEFAULT</FONT> 0x0fffffff</pre>
|
||||||
|
<dl>
|
||||||
|
<dd>
|
||||||
|
Default.
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
<hr>
|
||||||
<h2 align="center" id="Mw_Core_h">Mw/Core.h</h2>
|
<h2 align="center" id="Mw_Core_h">Mw/Core.h</h2>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>
|
<dt>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#include <Mw/Milsko.h>
|
#include <Mw/Milsko.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
MwWidget window = MwVaCreateWidget(MwWindowClass, "test", NULL, 0, 0, 8 + 16 + 8 + 16 * 10 + 8, 8 + 16 + 8 + 16 + 8,
|
MwWidget window = MwVaCreateWidget(MwWindowClass, "test", NULL, MwDEFAULT, MwDEFAULT, 8 + 16 + 8 + 16 * 10 + 8, 8 + 16 + 8 + 16 + 8,
|
||||||
MwNtitle, "checkbox",
|
MwNtitle, "checkbox",
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ void resize(MwWidget handle, void* user_data, void* call_data) {
|
||||||
int main() {
|
int main() {
|
||||||
MwMenu m, m2;
|
MwMenu m, m2;
|
||||||
|
|
||||||
window = MwVaCreateWidget(MwWindowClass, "main", NULL, 0, 0, 400, 400,
|
window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 400, 400,
|
||||||
MwNtitle, "hello world",
|
MwNtitle, "hello world",
|
||||||
NULL);
|
NULL);
|
||||||
menu = MwCreateWidget(MwMenuClass, "menu", window, 0, 0, 0, 0);
|
menu = MwCreateWidget(MwMenuClass, "menu", window, 0, 0, 0, 0);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#include <Mw/Milsko.h>
|
#include <Mw/Milsko.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
MwWidget window = MwVaCreateWidget(MwWindowClass, "window", NULL, 0, 0, 500, 500,
|
MwWidget window = MwVaCreateWidget(MwWindowClass, "window", NULL, MwDEFAULT, MwDEFAULT, 500, 500,
|
||||||
MwNtitle, "image image",
|
MwNtitle, "image image",
|
||||||
NULL);
|
NULL);
|
||||||
MwWidget image = MwCreateWidget(MwImageClass, "image", window, 50, 50, 200, 400);
|
MwWidget image = MwCreateWidget(MwImageClass, "image", window, 50, 50, 200, 400);
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ static void resize(MwWidget handle, void* user, void* client) {
|
||||||
int main() {
|
int main() {
|
||||||
MwWidget window;
|
MwWidget window;
|
||||||
|
|
||||||
window = MwVaCreateWidget(MwWindowClass, "main", NULL, 0, 0, 500, 500,
|
window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 500, 500,
|
||||||
MwNtitle, TITLE,
|
MwNtitle, TITLE,
|
||||||
NULL);
|
NULL);
|
||||||
opengl = MwCreateWidget(MwOpenGLClass, "opengl", window, 50, 50, 400, 400);
|
opengl = MwCreateWidget(MwOpenGLClass, "opengl", window, 50, 50, 400, 400);
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ void resize(MwWidget w, void* user, void* client) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
MwWidget window = MwVaCreateWidget(MwWindowClass, "window", NULL, 0, 0, (ww = 500), (wh = 500),
|
MwWidget window = MwVaCreateWidget(MwWindowClass, "window", NULL, MwDEFAULT, MwDEFAULT, (ww = 500), (wh = 500),
|
||||||
MwNtitle, "rotate",
|
MwNtitle, "rotate",
|
||||||
NULL);
|
NULL);
|
||||||
int i;
|
int i;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
#include <Mw/Milsko.h>
|
#include <Mw/Milsko.h>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
MwWidget window = MwVaCreateWidget(MwWindowClass, "main", NULL, 0, 0, 500, 500,
|
MwWidget window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 500, 500,
|
||||||
MwNtitle, "main",
|
MwNtitle, "main",
|
||||||
NULL);
|
NULL);
|
||||||
int i;
|
int i;
|
||||||
|
|
|
||||||
|
|
@ -642,7 +642,7 @@ int main() {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
window = MwVaCreateWidget(MwWindowClass, "main", NULL, 0, 0, 400, 450,
|
window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 400, 450,
|
||||||
MwNtitle, "hello world",
|
MwNtitle, "hello world",
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,4 +33,9 @@ enum MwALIGNMENT {
|
||||||
MwALIGNMENT_END,
|
MwALIGNMENT_END,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* %brief Default
|
||||||
|
*/
|
||||||
|
#define MwDEFAULT 0x0fffffff
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ MwLL MwLLCreate(MwLL parent, int x, int y, int width, int height) {
|
||||||
RegisterClassEx(&wc);
|
RegisterClassEx(&wc);
|
||||||
|
|
||||||
r->copy_buffer = 1;
|
r->copy_buffer = 1;
|
||||||
r->hWnd = CreateWindow(parent == NULL ? "milsko" : "STATIC", "Milsko", parent == NULL ? (WS_OVERLAPPEDWINDOW) : (WS_CHILD | WS_VISIBLE), x, y, width, height, parent == NULL ? NULL : parent->hWnd, 0, wc.hInstance, NULL);
|
r->hWnd = CreateWindow(parent == NULL ? "milsko" : "STATIC", "Milsko", parent == NULL ? (WS_OVERLAPPEDWINDOW) : (WS_CHILD | WS_VISIBLE), x == MwDEFAULT ? CW_USEDEFAULT : x, y == MwDEFAULT ? CW_USEDEFAULT : y, width, height, parent == NULL ? NULL : parent->hWnd, 0, wc.hInstance, NULL);
|
||||||
r->hInstance = wc.hInstance;
|
r->hInstance = wc.hInstance;
|
||||||
|
|
||||||
u->ll = r;
|
u->ll = r;
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@ MwLL MwLLCreate(MwLL parent, int x, int y, int width, int height) {
|
||||||
|
|
||||||
MwLLCreateCommon(r);
|
MwLLCreateCommon(r);
|
||||||
|
|
||||||
|
if(x == MwDEFAULT) x = 0;
|
||||||
|
if(y == MwDEFAULT) y = 0;
|
||||||
if(width < 1) width = 1;
|
if(width < 1) width = 1;
|
||||||
if(height < 1) height = 1;
|
if(height < 1) height = 1;
|
||||||
|
|
||||||
|
|
@ -37,19 +39,19 @@ MwLL MwLLCreate(MwLL parent, int x, int y, int width, int height) {
|
||||||
r->display = parent->display;
|
r->display = parent->display;
|
||||||
p = parent->window;
|
p = parent->window;
|
||||||
}
|
}
|
||||||
r->window = XCreateSimpleWindow(r->display, p, x, y, width, height, 0, 0, WhitePixel(r->display, XDefaultScreen(r->display)));
|
r->window = XCreateSimpleWindow(r->display, p, x, y, width, height, 0, 0, WhitePixel(r->display, XDefaultScreen(r->display)));
|
||||||
|
|
||||||
XSetLocaleModifiers("");
|
XSetLocaleModifiers("");
|
||||||
if((r->xim = XOpenIM(r->display, 0, 0, 0)) == NULL){
|
if((r->xim = XOpenIM(r->display, 0, 0, 0)) == NULL) {
|
||||||
XSetLocaleModifiers("@im=none");
|
XSetLocaleModifiers("@im=none");
|
||||||
r->xim = XOpenIM(r->display, 0, 0, 0);
|
r->xim = XOpenIM(r->display, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
r->xic = XCreateIC(r->xim,
|
r->xic = XCreateIC(r->xim,
|
||||||
XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
|
XNInputStyle, XIMPreeditNothing | XIMStatusNothing,
|
||||||
XNClientWindow, r->window,
|
XNClientWindow, r->window,
|
||||||
XNFocusWindow, r->window,
|
XNFocusWindow, r->window,
|
||||||
NULL);
|
NULL);
|
||||||
XSetICFocus(r->xic);
|
XSetICFocus(r->xic);
|
||||||
|
|
||||||
r->copy_buffer = 1;
|
r->copy_buffer = 1;
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@ struct _MwLL {
|
||||||
void* user;
|
void* user;
|
||||||
Atom wm_delete;
|
Atom wm_delete;
|
||||||
int copy_buffer;
|
int copy_buffer;
|
||||||
XIM xim;
|
XIM xim;
|
||||||
XIC xic;
|
XIC xic;
|
||||||
|
|
||||||
unsigned int width;
|
unsigned int width;
|
||||||
unsigned int height;
|
unsigned int height;
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,12 @@
|
||||||
#include <Mw/Milsko.h>
|
#include <Mw/Milsko.h>
|
||||||
|
|
||||||
static int create(MwWidget handle) {
|
static int create(MwWidget handle) {
|
||||||
int st;
|
int st;
|
||||||
MwEntry e;
|
MwEntry e;
|
||||||
|
|
||||||
if((st = MwEntryClass->create(handle)) != 0) return st;
|
if((st = MwEntryClass->create(handle)) != 0) return st;
|
||||||
|
|
||||||
e = handle->internal;
|
e = handle->internal;
|
||||||
e->right = 32;
|
e->right = 32;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -33,7 +33,7 @@ static void key(MwWidget handle, int code) {
|
||||||
ok = 1;
|
ok = 1;
|
||||||
} else if(code == '.' && strchr(str, (int)'.') == NULL) {
|
} else if(code == '.' && strchr(str, (int)'.') == NULL) {
|
||||||
ok = 1;
|
ok = 1;
|
||||||
}else if(code == MwLLKeyBackSpace || code == MwLLKeyLeft || code == MwLLKeyRight){
|
} else if(code == MwLLKeyBackSpace || code == MwLLKeyLeft || code == MwLLKeyRight) {
|
||||||
ok = 1;
|
ok = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,31 +2,37 @@
|
||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
my $target = "nt";
|
my $target = "nt";
|
||||||
my @cmd = ();
|
my @cmd = ();
|
||||||
push(@cmd, "-I$ENV{WATCOM}/h");
|
push(@cmd, "-I$ENV{WATCOM}/h");
|
||||||
push(@cmd, "-I$ENV{WATCOM}/h/nt");
|
push(@cmd, "-I$ENV{WATCOM}/h/nt");
|
||||||
push(@cmd, "-DSTBI_NO_SIMD");
|
push(@cmd, "-DSTBI_NO_SIMD");
|
||||||
foreach my $f (@ARGV){
|
foreach my $f (@ARGV) {
|
||||||
if($f eq "-static-libgcc"){
|
if ($f eq "-static-libgcc") {
|
||||||
next;
|
next;
|
||||||
}elsif($f =~ /^-Wl,--out-implib,(.+)$/){
|
}
|
||||||
push(@cmd, "-Wl,option implib=$1");
|
elsif ($f =~ /^-Wl,--out-implib,(.+)$/) {
|
||||||
next;
|
push(@cmd, "-Wl,option implib=$1");
|
||||||
}elsif($f =~ /^-W.+$/){
|
next;
|
||||||
next;
|
}
|
||||||
}elsif($f =~ /^-L(.+)$/){
|
elsif ($f =~ /^-W.+$/) {
|
||||||
push(@cmd, "-Wl,libpath $1");
|
next;
|
||||||
next;
|
}
|
||||||
}elsif($f eq "-lMw"){
|
elsif ($f =~ /^-L(.+)$/) {
|
||||||
push(@cmd, "-lMw");
|
push(@cmd, "-Wl,libpath $1");
|
||||||
next;
|
next;
|
||||||
}elsif($f =~ /^-l(.+)$/){
|
}
|
||||||
push(@cmd, "$1.lib");
|
elsif ($f eq "-lMw") {
|
||||||
next;
|
push(@cmd, "-lMw");
|
||||||
}elsif($f =~ /^(?:oo)?src\//){
|
next;
|
||||||
$target = "nt_dll";
|
}
|
||||||
}
|
elsif ($f =~ /^-l(.+)$/) {
|
||||||
push(@cmd, $f);
|
push(@cmd, "$1.lib");
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
elsif ($f =~ /^(?:oo)?src\//) {
|
||||||
|
$target = "nt_dll";
|
||||||
|
}
|
||||||
|
push(@cmd, $f);
|
||||||
}
|
}
|
||||||
|
|
||||||
unshift(@cmd, "-b$target");
|
unshift(@cmd, "-b$target");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue