mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-03 16:10:50 +00:00
fix things
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@542 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
48
BorMakefile
48
BorMakefile
@@ -7,65 +7,69 @@ LDFLAGS = -tWD
|
||||
.SUFFIXES: .obj .c
|
||||
all: src\Mw.dll
|
||||
clean:
|
||||
del /f /q src\core.obj
|
||||
del /f /q src\text.obj
|
||||
del /f /q src\string.obj
|
||||
del /f /q src\draw.obj
|
||||
del /f /q src\default.obj
|
||||
del /f /q src\filechooser.obj
|
||||
del /f /q src\lowlevel.obj
|
||||
del /f /q src\error.obj
|
||||
del /f /q src\unicode.obj
|
||||
del /f /q src\color.obj
|
||||
del /f /q src\directory.obj
|
||||
del /f /q src\text.obj
|
||||
del /f /q src\error.obj
|
||||
del /f /q src\unicode.obj
|
||||
del /f /q src\messagebox.obj
|
||||
del /f /q src\string.obj
|
||||
del /f /q src\filechooser.obj
|
||||
del /f /q src\core.obj
|
||||
del /f /q src\draw.obj
|
||||
del /f /q external\stb_ds.obj
|
||||
del /f /q external\stb_image.obj
|
||||
del /f /q external\stb_truetype.obj
|
||||
del /f /q src\icon\error.obj
|
||||
del /f /q src\icon\info.obj
|
||||
del /f /q src\icon\news.obj
|
||||
del /f /q src\icon\note.obj
|
||||
del /f /q src\icon\warning.obj
|
||||
del /f /q src\icon\error.obj
|
||||
del /f /q src\icon\news.obj
|
||||
del /f /q src\icon\directory.obj
|
||||
del /f /q src\icon\file.obj
|
||||
del /f /q src\icon\directory.obj
|
||||
del /f /q src\icon\back.obj
|
||||
del /f /q src\icon\forward.obj
|
||||
del /f /q src\icon\up.obj
|
||||
del /f /q src\icon\computer.obj
|
||||
del /f /q src\icon\up.obj
|
||||
del /f /q src\icon\search.obj
|
||||
del /f /q src\icon\down.obj
|
||||
del /f /q src\icon\left.obj
|
||||
del /f /q src\icon\right.obj
|
||||
del /f /q src\cursor\default.obj
|
||||
del /f /q src\cursor\cross.obj
|
||||
del /f /q src\cursor\default.obj
|
||||
del /f /q src\cursor\text.obj
|
||||
del /f /q src\cursor\hidden.obj
|
||||
del /f /q src\widget\button.obj
|
||||
del /f /q src\widget\frame.obj
|
||||
del /f /q src\widget\opengl.obj
|
||||
del /f /q src\widget\window.obj
|
||||
del /f /q src\widget\menu.obj
|
||||
del /f /q src\widget\entry.obj
|
||||
del /f /q src\widget\label.obj
|
||||
del /f /q src\widget\opengl.obj
|
||||
del /f /q src\widget\radiobox.obj
|
||||
del /f /q src\widget\submenu.obj
|
||||
del /f /q src\widget\viewport.obj
|
||||
del /f /q src\widget\menu.obj
|
||||
del /f /q src\widget\image.obj
|
||||
del /f /q src\widget\viewport.obj
|
||||
del /f /q src\widget\listbox.obj
|
||||
del /f /q src\widget\scrollbar.obj
|
||||
del /f /q src\widget\checkbox.obj
|
||||
del /f /q src\widget\label.obj
|
||||
del /f /q src\widget\listbox.obj
|
||||
del /f /q src\widget\numberentry.obj
|
||||
del /f /q src\widget\progressbar.obj
|
||||
del /f /q src\widget\radiobox.obj
|
||||
del /f /q src\font\boldttf.obj
|
||||
del /f /q src\font\ttf.obj
|
||||
del /f /q src\font\boldfont.obj
|
||||
del /f /q src\font\boldttf.obj
|
||||
del /f /q src\font\font.obj
|
||||
del /f /q src\font\ttf.obj
|
||||
del /f /q src\math\mmx_guard.obj
|
||||
del /f /q src\math\mmx.obj
|
||||
del /f /q src\math\default.obj
|
||||
del /f /q src\math\math.obj
|
||||
del /f /q src\backend\gdi.obj
|
||||
del /f /q src\Mw.dll
|
||||
|
||||
src\Mw.dll: src\core.obj src\text.obj src\string.obj src\draw.obj src\default.obj src\filechooser.obj src\lowlevel.obj src\error.obj src\unicode.obj src\color.obj src\directory.obj src\messagebox.obj external\stb_ds.obj external\stb_image.obj external\stb_truetype.obj src\icon\info.obj src\icon\note.obj src\icon\warning.obj src\icon\error.obj src\icon\news.obj src\icon\directory.obj src\icon\file.obj src\icon\back.obj src\icon\forward.obj src\icon\up.obj src\icon\computer.obj src\icon\search.obj src\icon\down.obj src\icon\left.obj src\icon\right.obj src\cursor\default.obj src\cursor\cross.obj src\cursor\text.obj src\cursor\hidden.obj src\widget\button.obj src\widget\frame.obj src\widget\opengl.obj src\widget\window.obj src\widget\menu.obj src\widget\entry.obj src\widget\submenu.obj src\widget\viewport.obj src\widget\image.obj src\widget\scrollbar.obj src\widget\checkbox.obj src\widget\label.obj src\widget\listbox.obj src\widget\numberentry.obj src\widget\progressbar.obj src\widget\radiobox.obj src\font\boldttf.obj src\font\ttf.obj src\font\boldfont.obj src\font\font.obj src\backend\gdi.obj
|
||||
$(LD) $(LDFLAGS) -e$@ src\core.obj src\text.obj src\string.obj src\draw.obj src\default.obj src\filechooser.obj src\lowlevel.obj src\error.obj src\unicode.obj src\color.obj src\directory.obj src\messagebox.obj external\stb_ds.obj external\stb_image.obj external\stb_truetype.obj src\icon\info.obj src\icon\note.obj src\icon\warning.obj src\icon\error.obj src\icon\news.obj src\icon\directory.obj src\icon\file.obj src\icon\back.obj src\icon\forward.obj src\icon\up.obj src\icon\computer.obj src\icon\search.obj src\icon\down.obj src\icon\left.obj src\icon\right.obj src\cursor\default.obj src\cursor\cross.obj src\cursor\text.obj src\cursor\hidden.obj src\widget\button.obj src\widget\frame.obj src\widget\opengl.obj src\widget\window.obj src\widget\menu.obj src\widget\entry.obj src\widget\submenu.obj src\widget\viewport.obj src\widget\image.obj src\widget\scrollbar.obj src\widget\checkbox.obj src\widget\label.obj src\widget\listbox.obj src\widget\numberentry.obj src\widget\progressbar.obj src\widget\radiobox.obj src\font\boldttf.obj src\font\ttf.obj src\font\boldfont.obj src\font\font.obj src\backend\gdi.obj -lopengl32.lib -lgdi32.lib -luser32.lib
|
||||
src\Mw.dll: src\default.obj src\lowlevel.obj src\color.obj src\directory.obj src\text.obj src\error.obj src\unicode.obj src\messagebox.obj src\string.obj src\filechooser.obj src\core.obj src\draw.obj external\stb_ds.obj external\stb_image.obj external\stb_truetype.obj src\icon\error.obj src\icon\info.obj src\icon\news.obj src\icon\note.obj src\icon\warning.obj src\icon\file.obj src\icon\directory.obj src\icon\back.obj src\icon\forward.obj src\icon\computer.obj src\icon\up.obj src\icon\search.obj src\icon\down.obj src\icon\left.obj src\icon\right.obj src\cursor\cross.obj src\cursor\default.obj src\cursor\text.obj src\cursor\hidden.obj src\widget\button.obj src\widget\frame.obj src\widget\window.obj src\widget\entry.obj src\widget\label.obj src\widget\opengl.obj src\widget\radiobox.obj src\widget\submenu.obj src\widget\menu.obj src\widget\image.obj src\widget\viewport.obj src\widget\listbox.obj src\widget\scrollbar.obj src\widget\checkbox.obj src\widget\numberentry.obj src\widget\progressbar.obj src\font\boldfont.obj src\font\boldttf.obj src\font\font.obj src\font\ttf.obj src\math\mmx_guard.obj src\math\mmx.obj src\math\default.obj src\math\math.obj src\backend\gdi.obj
|
||||
$(LD) $(LDFLAGS) -e$@ src\default.obj src\lowlevel.obj src\color.obj src\directory.obj src\text.obj src\error.obj src\unicode.obj src\messagebox.obj src\string.obj src\filechooser.obj src\core.obj src\draw.obj external\stb_ds.obj external\stb_image.obj external\stb_truetype.obj src\icon\error.obj src\icon\info.obj src\icon\news.obj src\icon\note.obj src\icon\warning.obj src\icon\file.obj src\icon\directory.obj src\icon\back.obj src\icon\forward.obj src\icon\computer.obj src\icon\up.obj src\icon\search.obj src\icon\down.obj src\icon\left.obj src\icon\right.obj src\cursor\cross.obj src\cursor\default.obj src\cursor\text.obj src\cursor\hidden.obj src\widget\button.obj src\widget\frame.obj src\widget\window.obj src\widget\entry.obj src\widget\label.obj src\widget\opengl.obj src\widget\radiobox.obj src\widget\submenu.obj src\widget\menu.obj src\widget\image.obj src\widget\viewport.obj src\widget\listbox.obj src\widget\scrollbar.obj src\widget\checkbox.obj src\widget\numberentry.obj src\widget\progressbar.obj src\font\boldfont.obj src\font\boldttf.obj src\font\font.obj src\font\ttf.obj src\math\mmx_guard.obj src\math\mmx.obj src\math\default.obj src\math\math.obj src\backend\gdi.obj -lopengl32.lib -lgdi32.lib -luser32.lib
|
||||
implib src\Mw.lib src\Mw.dll
|
||||
|
||||
.c.obj:
|
||||
|
||||
48
NTMakefile
48
NTMakefile
@@ -7,65 +7,69 @@ LDFLAGS = /DLL
|
||||
.SUFFIXES: .obj .c
|
||||
all: src\Mw.dll
|
||||
clean:
|
||||
del /f /q src\core.obj
|
||||
del /f /q src\text.obj
|
||||
del /f /q src\string.obj
|
||||
del /f /q src\draw.obj
|
||||
del /f /q src\default.obj
|
||||
del /f /q src\filechooser.obj
|
||||
del /f /q src\lowlevel.obj
|
||||
del /f /q src\error.obj
|
||||
del /f /q src\unicode.obj
|
||||
del /f /q src\color.obj
|
||||
del /f /q src\directory.obj
|
||||
del /f /q src\text.obj
|
||||
del /f /q src\error.obj
|
||||
del /f /q src\unicode.obj
|
||||
del /f /q src\messagebox.obj
|
||||
del /f /q src\string.obj
|
||||
del /f /q src\filechooser.obj
|
||||
del /f /q src\core.obj
|
||||
del /f /q src\draw.obj
|
||||
del /f /q external\stb_ds.obj
|
||||
del /f /q external\stb_image.obj
|
||||
del /f /q external\stb_truetype.obj
|
||||
del /f /q src\icon\error.obj
|
||||
del /f /q src\icon\info.obj
|
||||
del /f /q src\icon\news.obj
|
||||
del /f /q src\icon\note.obj
|
||||
del /f /q src\icon\warning.obj
|
||||
del /f /q src\icon\error.obj
|
||||
del /f /q src\icon\news.obj
|
||||
del /f /q src\icon\directory.obj
|
||||
del /f /q src\icon\file.obj
|
||||
del /f /q src\icon\directory.obj
|
||||
del /f /q src\icon\back.obj
|
||||
del /f /q src\icon\forward.obj
|
||||
del /f /q src\icon\up.obj
|
||||
del /f /q src\icon\computer.obj
|
||||
del /f /q src\icon\up.obj
|
||||
del /f /q src\icon\search.obj
|
||||
del /f /q src\icon\down.obj
|
||||
del /f /q src\icon\left.obj
|
||||
del /f /q src\icon\right.obj
|
||||
del /f /q src\cursor\default.obj
|
||||
del /f /q src\cursor\cross.obj
|
||||
del /f /q src\cursor\default.obj
|
||||
del /f /q src\cursor\text.obj
|
||||
del /f /q src\cursor\hidden.obj
|
||||
del /f /q src\widget\button.obj
|
||||
del /f /q src\widget\frame.obj
|
||||
del /f /q src\widget\opengl.obj
|
||||
del /f /q src\widget\window.obj
|
||||
del /f /q src\widget\menu.obj
|
||||
del /f /q src\widget\entry.obj
|
||||
del /f /q src\widget\label.obj
|
||||
del /f /q src\widget\opengl.obj
|
||||
del /f /q src\widget\radiobox.obj
|
||||
del /f /q src\widget\submenu.obj
|
||||
del /f /q src\widget\viewport.obj
|
||||
del /f /q src\widget\menu.obj
|
||||
del /f /q src\widget\image.obj
|
||||
del /f /q src\widget\viewport.obj
|
||||
del /f /q src\widget\listbox.obj
|
||||
del /f /q src\widget\scrollbar.obj
|
||||
del /f /q src\widget\checkbox.obj
|
||||
del /f /q src\widget\label.obj
|
||||
del /f /q src\widget\listbox.obj
|
||||
del /f /q src\widget\numberentry.obj
|
||||
del /f /q src\widget\progressbar.obj
|
||||
del /f /q src\widget\radiobox.obj
|
||||
del /f /q src\font\boldttf.obj
|
||||
del /f /q src\font\ttf.obj
|
||||
del /f /q src\font\boldfont.obj
|
||||
del /f /q src\font\boldttf.obj
|
||||
del /f /q src\font\font.obj
|
||||
del /f /q src\font\ttf.obj
|
||||
del /f /q src\math\mmx_guard.obj
|
||||
del /f /q src\math\mmx.obj
|
||||
del /f /q src\math\default.obj
|
||||
del /f /q src\math\math.obj
|
||||
del /f /q src\backend\gdi.obj
|
||||
del /f /q src\Mw.dll
|
||||
|
||||
src\Mw.dll: src\core.obj src\text.obj src\string.obj src\draw.obj src\default.obj src\filechooser.obj src\lowlevel.obj src\error.obj src\unicode.obj src\color.obj src\directory.obj src\messagebox.obj external\stb_ds.obj external\stb_image.obj external\stb_truetype.obj src\icon\info.obj src\icon\note.obj src\icon\warning.obj src\icon\error.obj src\icon\news.obj src\icon\directory.obj src\icon\file.obj src\icon\back.obj src\icon\forward.obj src\icon\up.obj src\icon\computer.obj src\icon\search.obj src\icon\down.obj src\icon\left.obj src\icon\right.obj src\cursor\default.obj src\cursor\cross.obj src\cursor\text.obj src\cursor\hidden.obj src\widget\button.obj src\widget\frame.obj src\widget\opengl.obj src\widget\window.obj src\widget\menu.obj src\widget\entry.obj src\widget\submenu.obj src\widget\viewport.obj src\widget\image.obj src\widget\scrollbar.obj src\widget\checkbox.obj src\widget\label.obj src\widget\listbox.obj src\widget\numberentry.obj src\widget\progressbar.obj src\widget\radiobox.obj src\font\boldttf.obj src\font\ttf.obj src\font\boldfont.obj src\font\font.obj src\backend\gdi.obj
|
||||
$(LD) $(LDFLAGS) /OUT:$@ src\core.obj src\text.obj src\string.obj src\draw.obj src\default.obj src\filechooser.obj src\lowlevel.obj src\error.obj src\unicode.obj src\color.obj src\directory.obj src\messagebox.obj external\stb_ds.obj external\stb_image.obj external\stb_truetype.obj src\icon\info.obj src\icon\note.obj src\icon\warning.obj src\icon\error.obj src\icon\news.obj src\icon\directory.obj src\icon\file.obj src\icon\back.obj src\icon\forward.obj src\icon\up.obj src\icon\computer.obj src\icon\search.obj src\icon\down.obj src\icon\left.obj src\icon\right.obj src\cursor\default.obj src\cursor\cross.obj src\cursor\text.obj src\cursor\hidden.obj src\widget\button.obj src\widget\frame.obj src\widget\opengl.obj src\widget\window.obj src\widget\menu.obj src\widget\entry.obj src\widget\submenu.obj src\widget\viewport.obj src\widget\image.obj src\widget\scrollbar.obj src\widget\checkbox.obj src\widget\label.obj src\widget\listbox.obj src\widget\numberentry.obj src\widget\progressbar.obj src\widget\radiobox.obj src\font\boldttf.obj src\font\ttf.obj src\font\boldfont.obj src\font\font.obj src\backend\gdi.obj opengl32.lib gdi32.lib user32.lib
|
||||
src\Mw.dll: src\default.obj src\lowlevel.obj src\color.obj src\directory.obj src\text.obj src\error.obj src\unicode.obj src\messagebox.obj src\string.obj src\filechooser.obj src\core.obj src\draw.obj external\stb_ds.obj external\stb_image.obj external\stb_truetype.obj src\icon\error.obj src\icon\info.obj src\icon\news.obj src\icon\note.obj src\icon\warning.obj src\icon\file.obj src\icon\directory.obj src\icon\back.obj src\icon\forward.obj src\icon\computer.obj src\icon\up.obj src\icon\search.obj src\icon\down.obj src\icon\left.obj src\icon\right.obj src\cursor\cross.obj src\cursor\default.obj src\cursor\text.obj src\cursor\hidden.obj src\widget\button.obj src\widget\frame.obj src\widget\window.obj src\widget\entry.obj src\widget\label.obj src\widget\opengl.obj src\widget\radiobox.obj src\widget\submenu.obj src\widget\menu.obj src\widget\image.obj src\widget\viewport.obj src\widget\listbox.obj src\widget\scrollbar.obj src\widget\checkbox.obj src\widget\numberentry.obj src\widget\progressbar.obj src\font\boldfont.obj src\font\boldttf.obj src\font\font.obj src\font\ttf.obj src\math\mmx_guard.obj src\math\mmx.obj src\math\default.obj src\math\math.obj src\backend\gdi.obj
|
||||
$(LD) $(LDFLAGS) /OUT:$@ src\default.obj src\lowlevel.obj src\color.obj src\directory.obj src\text.obj src\error.obj src\unicode.obj src\messagebox.obj src\string.obj src\filechooser.obj src\core.obj src\draw.obj external\stb_ds.obj external\stb_image.obj external\stb_truetype.obj src\icon\error.obj src\icon\info.obj src\icon\news.obj src\icon\note.obj src\icon\warning.obj src\icon\file.obj src\icon\directory.obj src\icon\back.obj src\icon\forward.obj src\icon\computer.obj src\icon\up.obj src\icon\search.obj src\icon\down.obj src\icon\left.obj src\icon\right.obj src\cursor\cross.obj src\cursor\default.obj src\cursor\text.obj src\cursor\hidden.obj src\widget\button.obj src\widget\frame.obj src\widget\window.obj src\widget\entry.obj src\widget\label.obj src\widget\opengl.obj src\widget\radiobox.obj src\widget\submenu.obj src\widget\menu.obj src\widget\image.obj src\widget\viewport.obj src\widget\listbox.obj src\widget\scrollbar.obj src\widget\checkbox.obj src\widget\numberentry.obj src\widget\progressbar.obj src\font\boldfont.obj src\font\boldttf.obj src\font\font.obj src\font\ttf.obj src\math\mmx_guard.obj src\math\mmx.obj src\math\default.obj src\math\math.obj src\backend\gdi.obj opengl32.lib gdi32.lib user32.lib
|
||||
|
||||
|
||||
.c.obj:
|
||||
|
||||
126
WatMakefile
126
WatMakefile
@@ -6,120 +6,124 @@ CFLAGS = -i=include -d_MILSKO -dUSE_GDI -dUSE_STB_TRUETYPE -dUSE_STB_IMAGE -dSTB
|
||||
LDFLAGS = system nt_dll
|
||||
all: src/Mw.dll
|
||||
clean: .SYMBOLIC
|
||||
%erase src/core.obj
|
||||
%erase src/text.obj
|
||||
%erase src/string.obj
|
||||
%erase src/draw.obj
|
||||
%erase src/default.obj
|
||||
%erase src/filechooser.obj
|
||||
%erase src/lowlevel.obj
|
||||
%erase src/error.obj
|
||||
%erase src/unicode.obj
|
||||
%erase src/color.obj
|
||||
%erase src/directory.obj
|
||||
%erase src/text.obj
|
||||
%erase src/error.obj
|
||||
%erase src/unicode.obj
|
||||
%erase src/messagebox.obj
|
||||
%erase src/string.obj
|
||||
%erase src/filechooser.obj
|
||||
%erase src/core.obj
|
||||
%erase src/draw.obj
|
||||
%erase external/stb_ds.obj
|
||||
%erase external/stb_image.obj
|
||||
%erase external/stb_truetype.obj
|
||||
%erase src/icon/error.obj
|
||||
%erase src/icon/info.obj
|
||||
%erase src/icon/news.obj
|
||||
%erase src/icon/note.obj
|
||||
%erase src/icon/warning.obj
|
||||
%erase src/icon/error.obj
|
||||
%erase src/icon/news.obj
|
||||
%erase src/icon/directory.obj
|
||||
%erase src/icon/file.obj
|
||||
%erase src/icon/directory.obj
|
||||
%erase src/icon/back.obj
|
||||
%erase src/icon/forward.obj
|
||||
%erase src/icon/up.obj
|
||||
%erase src/icon/computer.obj
|
||||
%erase src/icon/up.obj
|
||||
%erase src/icon/search.obj
|
||||
%erase src/icon/down.obj
|
||||
%erase src/icon/left.obj
|
||||
%erase src/icon/right.obj
|
||||
%erase src/cursor/default.obj
|
||||
%erase src/cursor/cross.obj
|
||||
%erase src/cursor/default.obj
|
||||
%erase src/cursor/text.obj
|
||||
%erase src/cursor/hidden.obj
|
||||
%erase src/widget/button.obj
|
||||
%erase src/widget/frame.obj
|
||||
%erase src/widget/opengl.obj
|
||||
%erase src/widget/window.obj
|
||||
%erase src/widget/menu.obj
|
||||
%erase src/widget/entry.obj
|
||||
%erase src/widget/label.obj
|
||||
%erase src/widget/opengl.obj
|
||||
%erase src/widget/radiobox.obj
|
||||
%erase src/widget/submenu.obj
|
||||
%erase src/widget/viewport.obj
|
||||
%erase src/widget/menu.obj
|
||||
%erase src/widget/image.obj
|
||||
%erase src/widget/viewport.obj
|
||||
%erase src/widget/listbox.obj
|
||||
%erase src/widget/scrollbar.obj
|
||||
%erase src/widget/checkbox.obj
|
||||
%erase src/widget/label.obj
|
||||
%erase src/widget/listbox.obj
|
||||
%erase src/widget/numberentry.obj
|
||||
%erase src/widget/progressbar.obj
|
||||
%erase src/widget/radiobox.obj
|
||||
%erase src/font/boldttf.obj
|
||||
%erase src/font/ttf.obj
|
||||
%erase src/font/boldfont.obj
|
||||
%erase src/font/boldttf.obj
|
||||
%erase src/font/font.obj
|
||||
%erase src/font/ttf.obj
|
||||
%erase src/math/mmx_guard.obj
|
||||
%erase src/math/mmx.obj
|
||||
%erase src/math/default.obj
|
||||
%erase src/math/math.obj
|
||||
%erase src/backend/gdi.obj
|
||||
%erase src/Mw.dll
|
||||
|
||||
src/Mw.dll: src/core.obj src/text.obj src/string.obj src/draw.obj src/default.obj src/filechooser.obj src/lowlevel.obj src/error.obj src/unicode.obj src/color.obj src/directory.obj src/messagebox.obj external/stb_ds.obj external/stb_image.obj external/stb_truetype.obj src/icon/info.obj src/icon/note.obj src/icon/warning.obj src/icon/error.obj src/icon/news.obj src/icon/directory.obj src/icon/file.obj src/icon/back.obj src/icon/forward.obj src/icon/up.obj src/icon/computer.obj src/icon/search.obj src/icon/down.obj src/icon/left.obj src/icon/right.obj src/cursor/default.obj src/cursor/cross.obj src/cursor/text.obj src/cursor/hidden.obj src/widget/button.obj src/widget/frame.obj src/widget/opengl.obj src/widget/window.obj src/widget/menu.obj src/widget/entry.obj src/widget/submenu.obj src/widget/viewport.obj src/widget/image.obj src/widget/scrollbar.obj src/widget/checkbox.obj src/widget/label.obj src/widget/listbox.obj src/widget/numberentry.obj src/widget/progressbar.obj src/widget/radiobox.obj src/font/boldttf.obj src/font/ttf.obj src/font/boldfont.obj src/font/font.obj src/backend/gdi.obj
|
||||
$(LD) $(LDFLAGS) option implib=src/Mw.lib name $@ file src/core.obj file src/text.obj file src/string.obj file src/draw.obj file src/default.obj file src/filechooser.obj file src/lowlevel.obj file src/error.obj file src/unicode.obj file src/color.obj file src/directory.obj file src/messagebox.obj file external/stb_ds.obj file external/stb_image.obj file external/stb_truetype.obj file src/icon/info.obj file src/icon/note.obj file src/icon/warning.obj file src/icon/error.obj file src/icon/news.obj file src/icon/directory.obj file src/icon/file.obj file src/icon/back.obj file src/icon/forward.obj file src/icon/up.obj file src/icon/computer.obj file src/icon/search.obj file src/icon/down.obj file src/icon/left.obj file src/icon/right.obj file src/cursor/default.obj file src/cursor/cross.obj file src/cursor/text.obj file src/cursor/hidden.obj file src/widget/button.obj file src/widget/frame.obj file src/widget/opengl.obj file src/widget/window.obj file src/widget/menu.obj file src/widget/entry.obj file src/widget/submenu.obj file src/widget/viewport.obj file src/widget/image.obj file src/widget/scrollbar.obj file src/widget/checkbox.obj file src/widget/label.obj file src/widget/listbox.obj file src/widget/numberentry.obj file src/widget/progressbar.obj file src/widget/radiobox.obj file src/font/boldttf.obj file src/font/ttf.obj file src/font/boldfont.obj file src/font/font.obj file src/backend/gdi.obj library clib3r.lib library opengl32.lib library gdi32.lib library user32.lib
|
||||
src/Mw.dll: src/default.obj src/lowlevel.obj src/color.obj src/directory.obj src/text.obj src/error.obj src/unicode.obj src/messagebox.obj src/string.obj src/filechooser.obj src/core.obj src/draw.obj external/stb_ds.obj external/stb_image.obj external/stb_truetype.obj src/icon/error.obj src/icon/info.obj src/icon/news.obj src/icon/note.obj src/icon/warning.obj src/icon/file.obj src/icon/directory.obj src/icon/back.obj src/icon/forward.obj src/icon/computer.obj src/icon/up.obj src/icon/search.obj src/icon/down.obj src/icon/left.obj src/icon/right.obj src/cursor/cross.obj src/cursor/default.obj src/cursor/text.obj src/cursor/hidden.obj src/widget/button.obj src/widget/frame.obj src/widget/window.obj src/widget/entry.obj src/widget/label.obj src/widget/opengl.obj src/widget/radiobox.obj src/widget/submenu.obj src/widget/menu.obj src/widget/image.obj src/widget/viewport.obj src/widget/listbox.obj src/widget/scrollbar.obj src/widget/checkbox.obj src/widget/numberentry.obj src/widget/progressbar.obj src/font/boldfont.obj src/font/boldttf.obj src/font/font.obj src/font/ttf.obj src/math/mmx_guard.obj src/math/mmx.obj src/math/default.obj src/math/math.obj src/backend/gdi.obj
|
||||
$(LD) $(LDFLAGS) option implib=src/Mw.lib name $@ file src/default.obj file src/lowlevel.obj file src/color.obj file src/directory.obj file src/text.obj file src/error.obj file src/unicode.obj file src/messagebox.obj file src/string.obj file src/filechooser.obj file src/core.obj file src/draw.obj file external/stb_ds.obj file external/stb_image.obj file external/stb_truetype.obj file src/icon/error.obj file src/icon/info.obj file src/icon/news.obj file src/icon/note.obj file src/icon/warning.obj file src/icon/file.obj file src/icon/directory.obj file src/icon/back.obj file src/icon/forward.obj file src/icon/computer.obj file src/icon/up.obj file src/icon/search.obj file src/icon/down.obj file src/icon/left.obj file src/icon/right.obj file src/cursor/cross.obj file src/cursor/default.obj file src/cursor/text.obj file src/cursor/hidden.obj file src/widget/button.obj file src/widget/frame.obj file src/widget/window.obj file src/widget/entry.obj file src/widget/label.obj file src/widget/opengl.obj file src/widget/radiobox.obj file src/widget/submenu.obj file src/widget/menu.obj file src/widget/image.obj file src/widget/viewport.obj file src/widget/listbox.obj file src/widget/scrollbar.obj file src/widget/checkbox.obj file src/widget/numberentry.obj file src/widget/progressbar.obj file src/font/boldfont.obj file src/font/boldttf.obj file src/font/font.obj file src/font/ttf.obj file src/math/mmx_guard.obj file src/math/mmx.obj file src/math/default.obj file src/math/math.obj file src/backend/gdi.obj library clib3r.lib library opengl32.lib library gdi32.lib library user32.lib
|
||||
|
||||
|
||||
|
||||
src/core.obj: src/core.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/text.obj: src/text.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/string.obj: src/string.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/draw.obj: src/draw.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/default.obj: src/default.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/filechooser.obj: src/filechooser.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/lowlevel.obj: src/lowlevel.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/error.obj: src/error.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/unicode.obj: src/unicode.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/color.obj: src/color.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/directory.obj: src/directory.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/text.obj: src/text.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/error.obj: src/error.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/unicode.obj: src/unicode.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/messagebox.obj: src/messagebox.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/string.obj: src/string.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/filechooser.obj: src/filechooser.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/core.obj: src/core.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/draw.obj: src/draw.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
external/stb_ds.obj: external/stb_ds.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
external/stb_image.obj: external/stb_image.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
external/stb_truetype.obj: external/stb_truetype.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/icon/error.obj: src/icon/error.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/icon/info.obj: src/icon/info.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/icon/news.obj: src/icon/news.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/icon/note.obj: src/icon/note.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/icon/warning.obj: src/icon/warning.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/icon/error.obj: src/icon/error.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/icon/news.obj: src/icon/news.c
|
||||
src/icon/file.obj: src/icon/file.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/icon/directory.obj: src/icon/directory.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/icon/file.obj: src/icon/file.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/icon/back.obj: src/icon/back.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/icon/forward.obj: src/icon/forward.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/icon/up.obj: src/icon/up.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/icon/computer.obj: src/icon/computer.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/icon/up.obj: src/icon/up.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/icon/search.obj: src/icon/search.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/icon/down.obj: src/icon/down.c
|
||||
@@ -128,10 +132,10 @@ src/icon/left.obj: src/icon/left.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/icon/right.obj: src/icon/right.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/cursor/default.obj: src/cursor/default.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/cursor/cross.obj: src/cursor/cross.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/cursor/default.obj: src/cursor/default.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/cursor/text.obj: src/cursor/text.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/cursor/hidden.obj: src/cursor/hidden.c
|
||||
@@ -140,41 +144,49 @@ src/widget/button.obj: src/widget/button.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/frame.obj: src/widget/frame.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/opengl.obj: src/widget/opengl.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/window.obj: src/widget/window.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/menu.obj: src/widget/menu.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/entry.obj: src/widget/entry.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/label.obj: src/widget/label.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/opengl.obj: src/widget/opengl.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/radiobox.obj: src/widget/radiobox.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/submenu.obj: src/widget/submenu.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/menu.obj: src/widget/menu.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/image.obj: src/widget/image.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/viewport.obj: src/widget/viewport.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/image.obj: src/widget/image.c
|
||||
src/widget/listbox.obj: src/widget/listbox.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/scrollbar.obj: src/widget/scrollbar.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/checkbox.obj: src/widget/checkbox.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/label.obj: src/widget/label.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/listbox.obj: src/widget/listbox.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/numberentry.obj: src/widget/numberentry.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/progressbar.obj: src/widget/progressbar.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/widget/radiobox.obj: src/widget/radiobox.c
|
||||
src/font/boldfont.obj: src/font/boldfont.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/font/boldttf.obj: src/font/boldttf.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/font/font.obj: src/font/font.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/font/ttf.obj: src/font/ttf.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/font/boldfont.obj: src/font/boldfont.c
|
||||
src/math/mmx_guard.obj: src/math/mmx_guard.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/font/font.obj: src/font/font.c
|
||||
src/math/mmx.obj: src/math/mmx.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/math/default.obj: src/math/default.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/math/math.obj: src/math/math.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
src/backend/gdi.obj: src/backend/gdi.c
|
||||
$(CC) $(CFLAGS) -fo=$@ $<
|
||||
|
||||
@@ -10,5 +10,7 @@ int main() {
|
||||
|
||||
MwWidget cpicker = MwColorPicker(w, "cpicker");
|
||||
|
||||
(void)cpicker;
|
||||
|
||||
MwLoop(w);
|
||||
}
|
||||
|
||||
@@ -1,220 +0,0 @@
|
||||
/* $Id$ */
|
||||
|
||||
#include <Mw/Milsko.h>
|
||||
MwWidget vp;
|
||||
|
||||
#define WIN_SIZE 512
|
||||
#define PICKER_SIZE 360
|
||||
#define IMG_POS ((WIN_SIZE - PICKER_SIZE) / 2)
|
||||
#define SCROLL_BAR_WIDTH 12
|
||||
#define MARGIN (PICKER_SIZE / 32)
|
||||
#define COLOR_DISPLAY_HEIGHT 12
|
||||
|
||||
typedef struct {
|
||||
double r; // a fraction between 0 and 1
|
||||
double g; // a fraction between 0 and 1
|
||||
double b; // a fraction between 0 and 1
|
||||
} rgb;
|
||||
|
||||
typedef struct {
|
||||
double h; // angle in degrees
|
||||
double s; // a fraction between 0 and 1
|
||||
double v; // a fraction between 0 and 1
|
||||
} hsv;
|
||||
|
||||
static rgb hsv2rgb(hsv in) {
|
||||
rgb out;
|
||||
|
||||
int i = (int)(floor(in.h * 6));
|
||||
double f = in.h * 6 - i;
|
||||
double p = in.v * (1 - in.s);
|
||||
double q = in.v * (1 - f * in.s);
|
||||
double t = in.v * (1 - (1 - f) * in.s);
|
||||
|
||||
switch(i % 6) {
|
||||
case 0:
|
||||
out.r = in.v, out.g = t, out.b = p;
|
||||
break;
|
||||
case 1:
|
||||
out.r = q, out.g = in.v, out.b = p;
|
||||
break;
|
||||
case 2:
|
||||
out.r = p, out.g = in.v, out.b = t;
|
||||
break;
|
||||
case 3:
|
||||
out.r = p, out.g = q, out.b = in.v;
|
||||
break;
|
||||
case 4:
|
||||
out.r = t, out.g = p, out.b = in.v;
|
||||
break;
|
||||
case 5:
|
||||
out.r = in.v, out.g = p, out.b = q;
|
||||
break;
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
MwWidget parent;
|
||||
MwWidget color_wheel_img;
|
||||
MwWidget value_slider;
|
||||
MwWidget color_display;
|
||||
MwWidget color_display_text;
|
||||
MwLLPixmap color_wheel_pixmap;
|
||||
MwLLPixmap color_display_pixmap;
|
||||
double value;
|
||||
unsigned char* color_wheel_image_data;
|
||||
unsigned char* color_display_image_data;
|
||||
MwPoint point;
|
||||
} color_wheel;
|
||||
|
||||
void color_wheel_wheel_image_update(color_wheel* wheel) {
|
||||
int y, x;
|
||||
for(y = 0; y < PICKER_SIZE; y++) {
|
||||
for(x = 0; x < PICKER_SIZE; x++) {
|
||||
int i = ((y * PICKER_SIZE) + x) * 4;
|
||||
int _x = x - (PICKER_SIZE / 2);
|
||||
int _y = y - (PICKER_SIZE / 2);
|
||||
|
||||
double dist = sqrt(_x * _x + _y * _y);
|
||||
|
||||
if(dist >= 180.) {
|
||||
wheel->color_wheel_image_data[i] = 0;
|
||||
wheel->color_wheel_image_data[i + 1] = 0;
|
||||
wheel->color_wheel_image_data[i + 2] = 0;
|
||||
wheel->color_wheel_image_data[i + 3] = 0;
|
||||
} else {
|
||||
double xd = (M_PI / 180.) * ((double)_x);
|
||||
double yd = (M_PI / 180.) * ((double)_y);
|
||||
|
||||
float angle = atan2(yd, xd) - M_PI;
|
||||
float hue = (angle * 180.) / M_PI;
|
||||
|
||||
hsv hsv_v;
|
||||
rgb color;
|
||||
|
||||
if(hue < 0.0) {
|
||||
hue += 360;
|
||||
}
|
||||
hsv_v.h = hue / 360.;
|
||||
hsv_v.s = (dist / 179.61);
|
||||
hsv_v.v = wheel->value;
|
||||
color = hsv2rgb(hsv_v);
|
||||
|
||||
wheel->color_wheel_image_data[i] = color.r * 255;
|
||||
wheel->color_wheel_image_data[i + 1] = color.g * 255;
|
||||
wheel->color_wheel_image_data[i + 2] = color.b * 255;
|
||||
|
||||
wheel->color_wheel_image_data[i + 3] = 255;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(wheel->color_wheel_pixmap != NULL) {
|
||||
MwLLDestroyPixmap(wheel->color_wheel_pixmap);
|
||||
}
|
||||
wheel->color_wheel_pixmap = MwLoadRaw(wheel->parent, wheel->color_wheel_image_data, PICKER_SIZE, PICKER_SIZE);
|
||||
MwVaApply(wheel->color_wheel_img, MwNpixmap, wheel->color_wheel_pixmap, NULL);
|
||||
}
|
||||
|
||||
static void color_wheel_click(MwWidget handle, void* user, void* call) {
|
||||
color_wheel* wheel = (color_wheel*)user;
|
||||
MwLLMouse* mouse = (MwLLMouse*)call;
|
||||
char* hexColor;
|
||||
int i, r, g, b, a;
|
||||
|
||||
(void)handle;
|
||||
(void)user;
|
||||
(void)call;
|
||||
|
||||
color_wheel_wheel_image_update(wheel);
|
||||
|
||||
i = ((mouse->point.y * PICKER_SIZE) + mouse->point.x) * 4;
|
||||
|
||||
r = wheel->color_wheel_image_data[i];
|
||||
g = wheel->color_wheel_image_data[i + 1];
|
||||
b = wheel->color_wheel_image_data[i + 2];
|
||||
a = wheel->color_wheel_image_data[i + 3];
|
||||
|
||||
(void)a;
|
||||
|
||||
hexColor = malloc(8);
|
||||
char* fgColor = malloc(8);
|
||||
snprintf(hexColor, 8, "#%02X%02X%02X", r, g, b);
|
||||
|
||||
int fr = r > 128 ? 0 : 255;
|
||||
int fg = g > 128 ? 0 : 255;
|
||||
int fb = b > 128 ? 0 : 255;
|
||||
|
||||
snprintf(fgColor, 8, "#%02X%02X%02X", fr, fg, fb);
|
||||
MwSetText(wheel->color_display, MwNbackground, hexColor);
|
||||
MwSetText(wheel->color_display_text, MwNforeground, fgColor);
|
||||
|
||||
MwSetText(wheel->color_display_text, MwNbackground, hexColor);
|
||||
MwSetText(wheel->color_display_text, MwNtext, hexColor);
|
||||
free(hexColor);
|
||||
}
|
||||
static void color_wheel_on_change_value(MwWidget handle, void* user, void* call) {
|
||||
color_wheel* wheel = (color_wheel*)user;
|
||||
|
||||
int value = MwGetInteger(handle, MwNvalue);
|
||||
int diff = MwGetInteger(handle, MwNchangedBy);
|
||||
|
||||
(void)diff;
|
||||
(void)call;
|
||||
|
||||
wheel->value = 1.0 - ((double)value / 1024.);
|
||||
|
||||
color_wheel_wheel_image_update(wheel);
|
||||
}
|
||||
void color_wheel_setup(MwWidget parent, color_wheel* wheel) {
|
||||
wheel->parent = parent;
|
||||
|
||||
wheel->color_wheel_img = MwVaCreateWidget(MwImageClass, "image", wheel->parent, IMG_POS, IMG_POS, PICKER_SIZE, PICKER_SIZE, NULL);
|
||||
|
||||
wheel->color_wheel_image_data = malloc(PICKER_SIZE * PICKER_SIZE * 4);
|
||||
wheel->color_display_image_data = malloc(PICKER_SIZE * COLOR_DISPLAY_HEIGHT * 4);
|
||||
|
||||
wheel->color_wheel_pixmap = NULL;
|
||||
wheel->color_display_pixmap = NULL;
|
||||
wheel->value = 1;
|
||||
|
||||
color_wheel_wheel_image_update(wheel);
|
||||
|
||||
MwAddUserHandler(wheel->color_wheel_img, MwNmouseDownHandler, color_wheel_click, wheel);
|
||||
|
||||
wheel->color_display = MwCreateWidget(MwFrameClass, "colorDisplayFrame", wheel->parent, IMG_POS, IMG_POS + PICKER_SIZE + MARGIN, PICKER_SIZE, PICKER_SIZE / 16);
|
||||
MwSetText(wheel->color_display, MwNbackground, "#000000");
|
||||
MwSetInteger(wheel->color_display, MwnhasBorder, 1);
|
||||
MwSetInteger(wheel->color_display, MwNinverted, 1);
|
||||
|
||||
wheel->color_display_text = MwCreateWidget(MwLabelClass, "colorDisplayFrameText", wheel->color_display, MwDefaultBorderWidth(parent), MwDefaultBorderWidth(parent), PICKER_SIZE - MwDefaultBorderWidth(parent), (PICKER_SIZE / 16) - (MwDefaultBorderWidth(parent) * 2));
|
||||
|
||||
wheel->value_slider = MwVaCreateWidget(MwScrollBarClass, "value-slider", wheel->parent,
|
||||
// x
|
||||
IMG_POS +
|
||||
PICKER_SIZE +
|
||||
MARGIN,
|
||||
|
||||
// y
|
||||
IMG_POS,
|
||||
|
||||
// width
|
||||
SCROLL_BAR_WIDTH,
|
||||
|
||||
// height
|
||||
PICKER_SIZE,
|
||||
|
||||
MwNorientation, MwVERTICAL, MwNminValue, 0, MwNmaxValue, 1024, NULL);
|
||||
|
||||
MwAddUserHandler(wheel->value_slider, MwNchangedHandler, color_wheel_on_change_value, wheel);
|
||||
};
|
||||
|
||||
int main() {
|
||||
MwWidget w = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, WIN_SIZE, WIN_SIZE, MwNtitle, "test", NULL);
|
||||
|
||||
color_wheel wheel;
|
||||
color_wheel_setup(w, &wheel);
|
||||
|
||||
MwLoop(w);
|
||||
}
|
||||
@@ -9,8 +9,9 @@
|
||||
#define __MW_LOWLEVEL_MATH_H__
|
||||
|
||||
#include <Mw/BaseTypes.h>
|
||||
#include <Mw/MachDep.h>
|
||||
|
||||
#if !defined(__i386__) && !defined(__x86_64__)
|
||||
#if !defined(__i386__) && !defined(__x86_64__) && !defined(__WATCOMC__)
|
||||
#warning LowLevelMath.h does not yet support non-X86 platforms
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* $Id$ */
|
||||
#include <Mw/LowLevelMath.h>
|
||||
#include "math.h"
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "math_internal.h"
|
||||
|
||||
static void default_add_u8(MwLLVec* a, MwLLVec* b, MwLLVec* out) {
|
||||
out->un.u8.a = a->un.u8.a + b->un.u8.a;
|
||||
@@ -407,6 +407,6 @@ static MwLLMathVTable* defaultMultiTable[_MwLLVecType_Max] = {
|
||||
&table_i32, // _MwLLVecTypeI32x2
|
||||
};
|
||||
|
||||
MwLLMathVTable** default_multi_table() {
|
||||
MwLLMathVTable** default_multi_table(void) {
|
||||
return defaultMultiTable;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
/* $Id$ */
|
||||
#include <Mw/LowLevelMath.h>
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include "math.h"
|
||||
#include "Mw/BaseTypes.h"
|
||||
#include "x86intrin.h"
|
||||
|
||||
#include "math_internal.h"
|
||||
|
||||
MwLLVec _MwLLVecCreateGeneric(MwLLVecType ty, ...) {
|
||||
MwLLVecUnion un;
|
||||
@@ -43,14 +39,23 @@ switch(ty) {
|
||||
}
|
||||
|
||||
static MwBool hasMMX(void) {
|
||||
MwU32 eax = 1;
|
||||
MwU32 ebx, edx;
|
||||
MwU32 _eax = 1;
|
||||
MwU32 _ebx, _edx;
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
__asm {
|
||||
cpuid
|
||||
mov _eax, eax
|
||||
mov _ebx, ebx
|
||||
mov _edx, edx
|
||||
}
|
||||
#else
|
||||
__asm__ __volatile__(
|
||||
"cpuid" : "=a"(eax), "=b"(ebx), "=d"(edx)
|
||||
"cpuid" : "=a"(_eax), "=b"(_ebx), "=d"(_edx)
|
||||
: "a"(1));
|
||||
#endif
|
||||
|
||||
return (edx & (1 << 23)) == (1 << 23);
|
||||
return (_edx & (1 << 23)) == (1 << 23);
|
||||
}
|
||||
|
||||
static MwLLMathVTable** mwLLMultiTable;
|
||||
|
||||
@@ -22,7 +22,7 @@ struct _MwLLMathVTable {
|
||||
|
||||
typedef struct _MwLLMathVTable MwLLMathVTable;
|
||||
|
||||
MwLLMathVTable** default_multi_table();
|
||||
MwLLMathVTable** default_multi_table(void);
|
||||
void mmx_apply(MwLLMathVTable**);
|
||||
|
||||
#endif
|
||||
@@ -1,13 +1,13 @@
|
||||
/* $Id$ */
|
||||
#include <Mw/LowLevelMath.h>
|
||||
#include "math.h"
|
||||
#include <assert.h>
|
||||
|
||||
#include "math_internal.h"
|
||||
#include <mmintrin.h>
|
||||
#include <stdio.h>
|
||||
#include <x86intrin.h>
|
||||
|
||||
#define DO_MMX_INTRINSIC(intrin, _ty, _rty, _tyn) \
|
||||
__m64 m = intrin(*(__m64*)&a->un._ty, *(__m64*)&b->un._ty); \
|
||||
out->un._rty = *(struct _tyn*)&m;
|
||||
struct _tyn* t = (struct _tyn*)&m; \
|
||||
out->un._rty = *t;
|
||||
|
||||
static void mmx_add_u8(MwLLVec* a, MwLLVec* b, MwLLVec* out) {
|
||||
DO_MMX_INTRINSIC(_m_paddusb, u8, u8, _MwLLVecDataU8x8);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/* $Id$ */
|
||||
#if defined(__WATCOMC__) || defined(__i386__) || defined(__amd64__)
|
||||
#include "mmx.c"
|
||||
#else
|
||||
|
||||
@@ -150,6 +150,7 @@ scan("src/cursor");
|
||||
scan("src/widget");
|
||||
scan("src/text");
|
||||
scan("src/font");
|
||||
scan("src/math");
|
||||
push(@cfiles, "src/backend/gdi.c");
|
||||
|
||||
generate("BorMakefile", "Borland");
|
||||
|
||||
Reference in New Issue
Block a user